Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
ab6e7592
Commit
ab6e7592
authored
Sep 23, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pointer_value -> pointer
parent
d2973766
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
format.cc
format.cc
+1
-1
format.h
format.h
+4
-4
test/util-test.cc
test/util-test.cc
+2
-2
No files found.
format.cc
View file @
ab6e7592
...
...
@@ -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_
)
...
...
format.h
View file @
ab6e7592
...
...
@@ -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
));
}
...
...
test/util-test.cc
View file @
ab6e7592
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment