0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00

In class Option, change storage class of "bool touched_" to

mutable so we can set it without having to resort to const_cast.
This commit is contained in:
James Yonan 2015-06-03 23:50:34 -06:00
parent da5927761c
commit 597c2837f4

View File

@ -283,8 +283,7 @@ namespace openvpn {
{
// Note that we violate constness here, which is done
// because the touched bit is considered to be option metadata.
Option *self = const_cast<Option *>(this);
self->touched_ = true;
touched_ = true;
}
// was this option processed?
@ -303,7 +302,7 @@ namespace openvpn {
return ret;
}
bool touched_;
mutable bool touched_;
std::vector<std::string> data;
};