From 1addec97bc096051fae003f91b2b2fbe97d9aca3 Mon Sep 17 00:00:00 2001 From: vitaut Date: Sat, 21 Mar 2015 20:16:36 -0700 Subject: [PATCH] Rename _ERR to ERROR_STR Identifiers beginning with an underscore and an uppercase letter are reserved [17.4.3.2.1]. --- format.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/format.cc b/format.cc index b0f71c6c..ef1237a7 100644 --- a/format.cc +++ b/format.cc @@ -229,14 +229,14 @@ void format_error_code(fmt::Writer &out, int error_code, // bad_alloc. out.clear(); static const char SEP[] = ": "; - static const char _ERR[] = "error "; + static const char ERROR_STR[] = "error "; fmt::internal::IntTraits::MainType ec_value = error_code; - // Subtract 2 to account for terminating null characters in SEP and _ERR. - std::size_t error_code_size = - sizeof(SEP) + sizeof(_ERR) + fmt::internal::count_digits(ec_value) - 2; + // Subtract 2 to account for terminating null characters in SEP and ERROR_STR. + std::size_t error_code_size = sizeof(SEP) + sizeof(ERROR_STR) - 2; + error_code_size += fmt::internal::count_digits(ec_value); if (message.size() <= fmt::internal::INLINE_BUFFER_SIZE - error_code_size) out << message << SEP; - out << _ERR << error_code; + out << ERROR_STR << error_code; assert(out.size() <= fmt::internal::INLINE_BUFFER_SIZE); }