Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 53078e2

Browse files
committed
Use Value::ToString to convert any type to string
No need to cast into type value first and then use std::to_string to print to stream.
1 parent 5386025 commit 53078e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/settings/settings_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ void SettingsManager::DefineSetting(SettingId id, const std::string &name,
143143
if (!value.CompareBetweenInclusive(min_value, max_value))
144144
throw SettingsException("Value given for \"" + name +
145145
"\" is not in its min-max bounds (" +
146-
std::to_string(min_value.GetAs<int32_t>()) + "-" +
147-
std::to_string(max_value.GetAs<int32_t>()) + ")");
146+
min_value.ToString() + "-" +
147+
max_value.ToString() + ")");
148148
}
149149

150150
settings_.emplace(id, Param(name, value, description, default_value,

0 commit comments

Comments
 (0)