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
f634ccb3
Commit
f634ccb3
authored
Jul 26, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ReportUnknownType -> report_unknown_type (
https://github.com/cppformat/cppformat/issues/50
)
parent
b498ba0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
format.cc
format.cc
+6
-6
format.h
format.h
+2
-2
No files found.
format.cc
View file @
f634ccb3
...
...
@@ -278,7 +278,7 @@ const uint64_t fmt::internal::POWERS_OF_10_64[] = {
ULongLong
(
1000000000
)
*
ULongLong
(
1000000000
)
*
10
};
void
fmt
::
internal
::
ReportUnknownT
ype
(
char
code
,
const
char
*
type
)
{
void
fmt
::
internal
::
report_unknown_t
ype
(
char
code
,
const
char
*
type
)
{
if
(
std
::
isprint
(
static_cast
<
unsigned
char
>
(
code
)))
{
throw
fmt
::
FormatError
(
fmt
::
format
(
"unknown format code '{}' for {}"
,
code
,
type
));
...
...
@@ -466,7 +466,7 @@ class fmt::internal::ArgFormatter :
void
visit_pointer
(
const
void
*
value
)
{
if
(
spec_
.
type_
&&
spec_
.
type_
!=
'p'
)
fmt
::
internal
::
ReportUnknownT
ype
(
spec_
.
type_
,
"pointer"
);
fmt
::
internal
::
report_unknown_t
ype
(
spec_
.
type_
,
"pointer"
);
spec_
.
flags_
=
fmt
::
HASH_FLAG
;
spec_
.
type_
=
'x'
;
writer_
.
write_int
(
reinterpret_cast
<
uintptr_t
>
(
value
),
spec_
);
...
...
@@ -522,7 +522,7 @@ void fmt::BasicWriter<Char>::write_double(T value, const FormatSpec &spec) {
upper
=
true
;
break
;
default:
internal
::
ReportUnknownT
ype
(
type
,
"double"
);
internal
::
report_unknown_t
ype
(
type
,
"double"
);
break
;
}
...
...
@@ -657,7 +657,7 @@ void fmt::BasicWriter<Char>::write_str(
// Check if StringChar is convertible to Char.
internal
::
CharTraits
<
Char
>::
convert
(
StringChar
());
if
(
spec
.
type_
&&
spec
.
type_
!=
's'
)
internal
::
ReportUnknownT
ype
(
spec
.
type_
,
"string"
);
internal
::
report_unknown_t
ype
(
spec
.
type_
,
"string"
);
const
StringChar
*
s
=
str
.
value
;
std
::
size_t
size
=
str
.
size
;
if
(
size
==
0
)
{
...
...
@@ -932,14 +932,14 @@ void fmt::internal::PrintfFormatter<Char>::Format(
break
;
case
Arg
:
:
POINTER
:
if
(
spec
.
type_
&&
spec
.
type_
!=
'p'
)
internal
::
ReportUnknownT
ype
(
spec
.
type_
,
"pointer"
);
internal
::
report_unknown_t
ype
(
spec
.
type_
,
"pointer"
);
spec
.
flags_
=
HASH_FLAG
;
spec
.
type_
=
'x'
;
writer
.
write_int
(
reinterpret_cast
<
uintptr_t
>
(
arg
.
pointer_value
),
spec
);
break
;
case
Arg
:
:
CUSTOM
:
if
(
spec
.
type_
)
internal
::
ReportUnknownT
ype
(
spec
.
type_
,
"object"
);
internal
::
report_unknown_t
ype
(
spec
.
type_
,
"object"
);
arg
.
custom
.
format
(
&
writer
,
arg
.
custom
.
value
,
"s"
);
break
;
default:
...
...
format.h
View file @
f634ccb3
...
...
@@ -426,7 +426,7 @@ struct IsLongDouble { enum {VALUE = 0}; };
template
<
>
struct
IsLongDouble
<
long
double
>
{
enum
{
VALUE
=
1
};
};
void
ReportUnknownT
ype
(
char
code
,
const
char
*
type
);
void
report_unknown_t
ype
(
char
code
,
const
char
*
type
);
extern
const
uint32_t
POWERS_OF_10_32
[];
extern
const
uint64_t
POWERS_OF_10_64
[];
...
...
@@ -1675,7 +1675,7 @@ void BasicWriter<Char>::write_int(T value, const Spec &spec) {
break
;
}
default:
internal
::
ReportUnknownT
ype
(
internal
::
report_unknown_t
ype
(
spec
.
type
(),
spec
.
flag
(
CHAR_FLAG
)
?
"char"
:
"integer"
);
break
;
}
...
...
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