summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2024-05-31 23:08:05 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2024-05-31 23:08:05 -0500
commitd494059164ef1ac47c1efc899cd2c571e42ef6a0 (patch)
tree9002520ea3909aca72b8bb420501dfe3527ca6aa /Source/Core
parent1d4f758b14f26bb8d0344399d838faadcbfd8ab2 (diff)
Common: update json util function for converting to numeric value to use a static_cast. As discussed, a Saturating cast doesn't make sense when converting a double to a float
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/JsonUtil.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/Common/JsonUtil.h b/Source/Core/Common/JsonUtil.h
index 309f32f4b4..c830d777a4 100644
--- a/Source/Core/Common/JsonUtil.h
+++ b/Source/Core/Common/JsonUtil.h
@@ -9,7 +9,6 @@
#include <picojson.h>
-#include "Common/MathUtil.h"
#include "Common/Matrix.h"
// Ideally this would use a concept like, 'template <std::ranges::range Range>' to constrain it,
@@ -47,7 +46,7 @@ std::optional<Type> ReadNumericFromJson(const picojson::object& obj, const std::
return std::nullopt;
if (!it->second.is<double>())
return std::nullopt;
- return MathUtil::SaturatingCast<Type>(it->second.get<double>());
+ return static_cast<Type>(it->second.get<double>());
}
std::optional<std::string> ReadStringFromJson(const picojson::object& obj, const std::string& key);