mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
fix typeinfo_pointer_cast usage
This commit is contained in:
parent
28cc6fdbd3
commit
0d318ceda6
1 changed files with 2 additions and 2 deletions
|
@ -264,7 +264,7 @@ namespace geode {
|
||||||
template <class T>
|
template <class T>
|
||||||
T getSettingValue(std::string_view const key) const {
|
T getSettingValue(std::string_view const key) const {
|
||||||
using S = typename SettingTypeForValueType<T>::SettingType;
|
using S = typename SettingTypeForValueType<T>::SettingType;
|
||||||
if (auto sett = typeinfo_pointer_cast<S>(this->getSettingV3(key))) {
|
if (auto sett = cast::typeinfo_pointer_cast<S>(this->getSettingV3(key))) {
|
||||||
return sett->getValue();
|
return sett->getValue();
|
||||||
}
|
}
|
||||||
return T();
|
return T();
|
||||||
|
@ -273,7 +273,7 @@ namespace geode {
|
||||||
template <class T>
|
template <class T>
|
||||||
T setSettingValue(std::string_view const key, T const& value) {
|
T setSettingValue(std::string_view const key, T const& value) {
|
||||||
using S = typename SettingTypeForValueType<T>::SettingType;
|
using S = typename SettingTypeForValueType<T>::SettingType;
|
||||||
if (auto sett = typeinfo_pointer_cast<S>(this->getSettingV3(key))) {
|
if (auto sett = cast::typeinfo_pointer_cast<S>(this->getSettingV3(key))) {
|
||||||
auto old = sett->getValue();
|
auto old = sett->getValue();
|
||||||
sett->setValue(value);
|
sett->setValue(value);
|
||||||
return old;
|
return old;
|
||||||
|
|
Loading…
Reference in a new issue