mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 12:12:15 +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:
parent
da5927761c
commit
597c2837f4
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user