diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-13 05:54:26 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-13 05:54:26 +0200 |
commit | 2190e34b7b0a11dd5a513d941527f8bc35cb9c9f (patch) | |
tree | 3bb1d7faff71a8a4ec57b99eddb29b302a2519f8 /compat | |
parent | 5cb62c2360c417b60a1a29a708f4605a347a948c (diff) |
less header pollution
Diffstat (limited to 'compat')
-rw-r--r-- | compat/format.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compat/format.hpp b/compat/format.hpp index 4fa05f26..9a61dd96 100644 --- a/compat/format.hpp +++ b/compat/format.hpp @@ -1,9 +1,10 @@ #pragma once #include <fmt/core.h> #include <fmt/compile.h> -#include <Corrade/Utility/Move.h> #include <Corrade/Containers/StringView.h> #include <Corrade/Containers/String.h> +#include <Corrade/Utility/Math.h> +#include <Corrade/Utility/Move.h> namespace fmt { @@ -52,7 +53,7 @@ size_t snformat(char(&buf)[N], Fmt&& fmt, Xs&&... args) { constexpr size_t n = N > 0 ? N - 1 : 0; auto result = fmt::format_to_n(buf, n, Corrade::Utility::forward<Fmt>(fmt), Corrade::Utility::forward<Xs>(args)...); - const auto len = std::min(n, result.size); + const auto len = Utility::min(n, result.size); if constexpr(N > 0) buf[len] = '\0'; return len; |