diff --git a/format.cc b/format.cc index e1bf382e..5ec3f429 100644 --- a/format.cc +++ b/format.cc @@ -831,7 +831,7 @@ void fmt::internal::PrintfFormatter::format( internal::report_unknown_type(spec.type_, "pointer"); spec.flags_= HASH_FLAG; spec.type_ = 'x'; - writer.write_int(reinterpret_cast(arg.pointer_value), spec); + writer.write_int(reinterpret_cast(arg.pointer), spec); break; case Arg::CUSTOM: { if (spec.type_) diff --git a/format.h b/format.h index 84a0e8c4..75f0601e 100644 --- a/format.h +++ b/format.h @@ -631,7 +631,7 @@ struct Value { ULongLong ulong_long_value; double double_value; long double long_double_value; - const void *pointer_value; + const void *pointer; StringValue string; StringValue wstring; CustomValue custom; @@ -803,8 +803,8 @@ public: MakeArg(const std::wstring &value) { set_string(value); } MakeArg(WStringRef value) { set_string(value); } - MakeArg(void *value) { pointer_value = value; } - MakeArg(const void *value) { pointer_value = value; } + MakeArg(void *value) { pointer = value; } + MakeArg(const void *value) { pointer = value; } template MakeArg(const T &value) { @@ -908,7 +908,7 @@ class ArgVisitor { case Arg::WSTRING: return FMT_DISPATCH(visit_wstring(arg.wstring)); case Arg::POINTER: - return FMT_DISPATCH(visit_pointer(arg.pointer_value)); + return FMT_DISPATCH(visit_pointer(arg.pointer)); case Arg::CUSTOM: return FMT_DISPATCH(visit_custom(arg.custom)); } diff --git a/test/util-test.cc b/test/util-test.cc index e77d65fe..aa05b908 100644 --- a/test/util-test.cc +++ b/test/util-test.cc @@ -96,7 +96,7 @@ ARG_INFO(LONG_DOUBLE, long double, long_double_value); ARG_INFO(CHAR, int, int_value); ARG_INFO(STRING, const char *, string.value); ARG_INFO(WSTRING, const wchar_t *, wstring.value); -ARG_INFO(POINTER, const void *, pointer_value); +ARG_INFO(POINTER, const void *, pointer); ARG_INFO(CUSTOM, Arg::CustomValue, custom); #define CHECK_ARG_INFO(Type, field, value) { \ @@ -118,7 +118,7 @@ TEST(ArgTest, ArgInfo) { const wchar_t WSTR[] = L"abc"; CHECK_ARG_INFO(WSTRING, wstring.value, WSTR); int p = 0; - CHECK_ARG_INFO(POINTER, pointer_value, &p); + CHECK_ARG_INFO(POINTER, pointer, &p); Value value = {}; value.custom.value = &p; EXPECT_EQ(&p, ArgInfo::get(value).value);