From 1fb1e0da7793668e5ce56507d243a7ce8abb4af8 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 18 Dec 2022 16:32:46 -0600 Subject: [PATCH] [ox/std] Fix unnecessary implicit sign conversion (synced from 22a7ff74cee07cc8818c2baba75fa844d5b656c4) --- src/ox/std/fmt.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ox/std/fmt.hpp b/src/ox/std/fmt.hpp index e41fc1977..6019adb32 100644 --- a/src/ox/std/fmt.hpp +++ b/src/ox/std/fmt.hpp @@ -153,9 +153,9 @@ template [[nodiscard]] constexpr Fmt fmtSegments(StringView fmt) noexcept { Fmt out; - const auto prev = [fmt](int i) -> char { + const auto prev = [fmt](std::size_t i) -> char { if (i > 0) { - return fmt[static_cast(i) - 1]; + return fmt[i - 1]; } else { return '\0'; }