Skip to content

Commit

Permalink
allow for floats and any integer type in getSettingValue
Browse files Browse the repository at this point in the history
  • Loading branch information
matcool committed Dec 17, 2024
1 parent 6cc2e15 commit d08e141
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions loader/include/Geode/loader/SettingV3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "../DefaultInclude.hpp"
#include <optional>
#include <concepts>
#include <cocos2d.h>
#include "../utils/cocos.hpp"
#include "../utils/file.hpp"
Expand Down Expand Up @@ -705,12 +706,12 @@ namespace geode {
struct SettingTypeForValueType<bool> {
using SettingType = BoolSettingV3;
};
template <>
struct SettingTypeForValueType<int64_t> {
template <std::integral T>
struct SettingTypeForValueType<T> {
using SettingType = IntSettingV3;
};
template <>
struct SettingTypeForValueType<double> {
template <std::floating_point T>
struct SettingTypeForValueType<T> {
using SettingType = FloatSettingV3;
};
template <>
Expand Down

0 comments on commit d08e141

Please sign in to comment.