mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-22 19:29:04 -05:00
Update Ghoul repository
Adapt to changes in Ghoul
This commit is contained in:
@@ -67,7 +67,7 @@ public:
|
||||
using TemplateProperty<T>::operator=;
|
||||
|
||||
|
||||
void setInterpolationTarget(ghoul::any value) override;
|
||||
void setInterpolationTarget(std::any value) override;
|
||||
void setLuaInterpolationTarget(lua_State* state) override;
|
||||
void setStringInterpolationTarget(std::string value) override;
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ bool NumericalProperty<T>::setStringValue(std::string value) {
|
||||
value, success
|
||||
);
|
||||
if (success) {
|
||||
TemplateProperty<T>::set(ghoul::any(std::move(thisValue)));
|
||||
TemplateProperty<T>::set(std::any(std::move(thisValue)));
|
||||
}
|
||||
return success;
|
||||
}
|
||||
@@ -422,8 +422,8 @@ std::string NumericalProperty<T>::jsonValue() const {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void NumericalProperty<T>::setInterpolationTarget(ghoul::any value) {
|
||||
T v = ghoul::any_cast<T>(std::move(value));
|
||||
void NumericalProperty<T>::setInterpolationTarget(std::any value) {
|
||||
T v = std::any_cast<T>(std::move(value));
|
||||
|
||||
_interpolationStart = TemplateProperty<T>::_value;
|
||||
_interpolationEnd = std::move(v);
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
* \return The value that is encapsulated by this Property, or an empty ghoul::any
|
||||
* object if the method was not overritten.
|
||||
*/
|
||||
virtual ghoul::any get() const;
|
||||
virtual std::any get() const;
|
||||
|
||||
/**
|
||||
* Sets the value encapsulated by this Property to the \p value passed to this
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
*
|
||||
* \param value The new value that should be stored in this Property
|
||||
*/
|
||||
virtual void set(ghoul::any value);
|
||||
virtual void set(std::any value);
|
||||
|
||||
/**
|
||||
* This method returns the type that is requested by this Property for the set method.
|
||||
@@ -453,7 +453,7 @@ public:
|
||||
virtual std::string jsonValue() const;
|
||||
|
||||
/// Interpolation methods
|
||||
virtual void setInterpolationTarget(ghoul::any value);
|
||||
virtual void setInterpolationTarget(std::any value);
|
||||
virtual void setLuaInterpolationTarget(lua_State* state);
|
||||
virtual void setStringInterpolationTarget(std::string value);
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
*
|
||||
* \return The stored value packed into a ghoul::any object
|
||||
*/
|
||||
virtual ghoul::any get() const override;
|
||||
virtual std::any get() const override;
|
||||
|
||||
/**
|
||||
* Sets the value from the provided ghoul::any object. If the types between
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
*
|
||||
* \param value The value that is used to set this Property
|
||||
*/
|
||||
virtual void set(ghoul::any value) override;
|
||||
virtual void set(std::any value) override;
|
||||
|
||||
/**
|
||||
* Returns the <code>std::type_info</code> describing the template parameter
|
||||
|
||||
@@ -186,13 +186,13 @@ std::ostream& operator<<(std::ostream& os, const TemplateProperty<T>& obj) {
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
ghoul::any TemplateProperty<T>::get() const {
|
||||
return ghoul::any(_value);
|
||||
std::any TemplateProperty<T>::get() const {
|
||||
return std::any(_value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void TemplateProperty<T>::set(ghoul::any value) {
|
||||
T v = ghoul::any_cast<T>(std::move(value));
|
||||
void TemplateProperty<T>::set(std::any value) {
|
||||
T v = std::any_cast<T>(std::move(value));
|
||||
if (v != _value) {
|
||||
_value = std::move(v);
|
||||
notifyChangeListeners();
|
||||
@@ -221,7 +221,7 @@ bool TemplateProperty<T>::setLuaValue(lua_State* state) {
|
||||
success
|
||||
);
|
||||
if (success) {
|
||||
set(ghoul::any(thisValue));
|
||||
set(std::any(thisValue));
|
||||
}
|
||||
return success;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ bool TemplateProperty<T>::setStringValue(std::string value) {
|
||||
success
|
||||
);
|
||||
if (success) {
|
||||
set(ghoul::any(thisValue));
|
||||
set(std::any(thisValue));
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
* listeners regardless of the value
|
||||
* \param value The ignored value
|
||||
*/
|
||||
void set(ghoul::any value) override;
|
||||
void set(std::any value) override;
|
||||
|
||||
std::string toJson() const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user