diff --git a/include/openspace/properties/numericalproperty.inl b/include/openspace/properties/numericalproperty.inl index 5366f2d6fd..964c29190d 100644 --- a/include/openspace/properties/numericalproperty.inl +++ b/include/openspace/properties/numericalproperty.inl @@ -48,9 +48,9 @@ namespace properties { template <> \ TYPE PropertyDelegate>::defaultMaximumValue(); \ \ - template <> \ - template <> \ - TYPE PropertyDelegate>::defaultSteppingValue(); \ + template <> \ + template <> \ + TYPE PropertyDelegate>::defaultSteppingValue(); \ \ template <> \ template <> \ @@ -133,12 +133,12 @@ namespace properties { return DEFAULT_MAX_VALUE; \ } \ \ - template <> \ - template <> \ + template <> \ + template <> \ TYPE PropertyDelegate>::defaultSteppingValue() \ - { \ + { \ return DEFAULT_STEPPING; \ - } \ + } \ \ template <> \ template <> \ @@ -283,16 +283,20 @@ template bool NumericalProperty::setLuaValue(lua_State* state) { bool success = false; - T value = PropertyDelegate>::template fromLuaValue(state, success); + T value = PropertyDelegate>::template fromLuaValue( + state, success + ); if (success) - TemplateProperty::setValue(value); + TemplateProperty::setValue(std::move(value)); return success; } template bool NumericalProperty::getLuaValue(lua_State* state) const { - bool success = PropertyDelegate>::template toLuaValue(state, TemplateProperty::_value); + bool success = PropertyDelegate>::template toLuaValue( + state, TemplateProperty::_value + ); return success; } @@ -303,16 +307,20 @@ int NumericalProperty::typeLua() const { template bool NumericalProperty::getStringValue(std::string& value) const { - bool success = PropertyDelegate>::template toString(value, TemplateProperty::_value); + bool success = PropertyDelegate>::template toString( + value, TemplateProperty::_value + ); return success; } template bool NumericalProperty::setStringValue(std::string value) { bool success = false; - T thisValue = PropertyDelegate>::template fromString(value, success); + T thisValue = PropertyDelegate>::template fromString( + value, success + ); if (success) - TemplateProperty::set(ghoul::any(thisValue)); + TemplateProperty::set(ghoul::any(std::move(thisValue))); return success; } diff --git a/include/openspace/properties/scalarproperty.h b/include/openspace/properties/scalarproperty.h index 18984b5aec..29cdb9100c 100644 --- a/include/openspace/properties/scalarproperty.h +++ b/include/openspace/properties/scalarproperty.h @@ -32,7 +32,7 @@ namespace properties { REGISTER_TEMPLATEPROPERTY_HEADER(BoolProperty, bool); REGISTER_NUMERICALPROPERTY_HEADER(CharProperty, char); -REGISTER_NUMERICALPROPERTY_HEADER(WCharProperty, wchar_t); +//REGISTER_NUMERICALPROPERTY_HEADER(WCharProperty, wchar_t); REGISTER_NUMERICALPROPERTY_HEADER(SignedCharProperty, signed char); REGISTER_NUMERICALPROPERTY_HEADER(UCharProperty, unsigned char); REGISTER_NUMERICALPROPERTY_HEADER(ShortProperty, short);