From 330626ab22fe2e87afa5306c5f4039088c41b49e Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Mon, 4 May 2020 19:21:48 +0100 Subject: Update submodules --- src/Vector3.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/Vector3.h') diff --git a/src/Vector3.h b/src/Vector3.h index 05c9c66de..0c7008763 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -400,26 +400,25 @@ public: -namespace fmt -{ +/** Allows formatting a Vector using the same format specifiers as for T +e.g. `fmt::format("{0:0.2f}", Vector3f{0.0231f, 1.2146f, 1.0f}) == "{0.02, 1.21, 1.00}"` */ template -class formatter>: - public fmt::formatter +class fmt::formatter> : public fmt::formatter { using Super = fmt::formatter; template void Write(FormatContext & a_Ctx, const char (& a_Str)[Len]) { - auto Itr = std::copy_n(&a_Str[0], Len - 1, a_Ctx.out()); + const auto Itr = std::copy_n(&a_Str[0], Len - 1, a_Ctx.out()); a_Ctx.advance_to(Itr); } template void Write(FormatContext & a_Ctx, const What & a_Arg) { - auto Itr = Super::format(a_Arg, a_Ctx); + const auto Itr = Super::format(a_Arg, a_Ctx); a_Ctx.advance_to(Itr); } @@ -440,8 +439,6 @@ public: } }; -} - -- cgit v1.2.3