ensure that mutator function for CONFIG_VARIABLE_SPECIAL is used when assigning initial value during construction

This commit is contained in:
Paul Davis 2015-10-21 07:53:21 -04:00
parent 7a453d2329
commit 6e7ca06f63

View file

@ -167,7 +167,7 @@ class /*LIBPBD_API*/ ConfigVariableWithMutation : public ConfigVariable<T>
{
public:
ConfigVariableWithMutation (std::string name, T val, T (*m)(T))
: ConfigVariable<T> (name, val), mutator (m) {}
: ConfigVariable<T> (name, m (val)), unmutated_value (val), mutator (m) {}
bool set (T val) {
if (unmutated_value != val) {