diff options
-rw-r--r-- | compat/debug.cpp | 4 | ||||
-rw-r--r-- | compat/debug.hpp | 4 | ||||
-rw-r--r-- | editor/app.hpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compat/debug.cpp b/compat/debug.cpp index 0c7a6fd1..2b900180 100644 --- a/compat/debug.cpp +++ b/compat/debug.cpp @@ -54,7 +54,7 @@ template struct Quoted<StringView>; Debug& operator<<(Debug& dbg, Fraction f) { char fmt[8], buf[56]; - std::snprintf(fmt, sizeof fmt, "%%.%hhuf", f.decimal_points); + std::snprintf(fmt, sizeof fmt, "%%.%uf", (unsigned)f.decimal_points); std::snprintf(buf, sizeof buf, fmt, (double)f.value); dbg << buf; return dbg; @@ -70,6 +70,6 @@ Colon colon(char c) { return Colon{c}; } ErrorString error_string(int error) { return { error }; } ErrorString error_string() { return { errno }; } -Fraction fraction(float value, uint8_t decimal_points) { return Fraction { value, decimal_points }; } +Fraction fraction(float value, int decimal_points) { return Fraction { value, decimal_points }; } } // namespace floormat diff --git a/compat/debug.hpp b/compat/debug.hpp index 656ff654..9fd0f2a9 100644 --- a/compat/debug.hpp +++ b/compat/debug.hpp @@ -44,7 +44,7 @@ template<typename T> Debug& operator<<(Debug& dbg, Quoted<T> box) struct Fraction { float value; - uint8_t decimal_points; + int decimal_points; }; Debug& operator<<(Debug& dbg, Fraction frac); @@ -61,7 +61,7 @@ floormat::detail::corrade_debug::Colon colon(char c = ':'); floormat::detail::corrade_debug::ErrorString error_string(int error); floormat::detail::corrade_debug::ErrorString error_string(); -floormat::detail::corrade_debug::Fraction fraction(float value, uint8_t decimal_points = 1); +floormat::detail::corrade_debug::Fraction fraction(float value, int decimal_points = 1); template<DebugPrintable T> auto quoted(T&& value, char c = '\'') diff --git a/editor/app.hpp b/editor/app.hpp index b3645a7d..4cc24259 100644 --- a/editor/app.hpp +++ b/editor/app.hpp @@ -86,7 +86,7 @@ struct app final : floormat_app shared_ptr_wrapper<critter> ensure_player_character(world& w); private: - app(fm_settings&& opts); + explicit app(fm_settings&& opts); fm_DECLARE_DELETED_COPY_ASSIGNMENT(app); fm_DECLARE_DEPRECATED_MOVE_ASSIGNMENT(app); |