Commit ab6e7592 authored by Victor Zverovich's avatar Victor Zverovich

pointer_value -> pointer

parent d2973766
......@@ -831,7 +831,7 @@ void fmt::internal::PrintfFormatter<Char>::format(
internal::report_unknown_type(spec.type_, "pointer");
spec.flags_= HASH_FLAG;
spec.type_ = 'x';
writer.write_int(reinterpret_cast<uintptr_t>(arg.pointer_value), spec);
writer.write_int(reinterpret_cast<uintptr_t>(arg.pointer), spec);
break;
case Arg::CUSTOM: {
if (spec.type_)
......
......@@ -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<char> string;
StringValue<wchar_t> 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 <typename T>
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));
}
......
......@@ -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<Arg::CUSTOM>::get(value).value);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment