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
9144a8fb
Commit
9144a8fb
authored
Jul 16, 2014
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PrintfParser -> PrintfFormatter.
parent
e2a66c58
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
format.cc
format.cc
+6
-6
format.h
format.h
+4
-4
No files found.
format.cc
View file @
9144a8fb
...
...
@@ -707,7 +707,7 @@ void fmt::BasicFormatter<Char>::CheckSign(
}
template
<
typename
Char
>
void
fmt
::
internal
::
Printf
Pars
er
<
Char
>::
ParseFlags
(
void
fmt
::
internal
::
Printf
Formatt
er
<
Char
>::
ParseFlags
(
FormatSpec
&
spec
,
const
Char
*&
s
)
{
for
(;;)
{
switch
(
*
s
++
)
{
...
...
@@ -734,7 +734,7 @@ void fmt::internal::PrintfParser<Char>::ParseFlags(
}
template
<
typename
Char
>
unsigned
fmt
::
internal
::
Printf
Pars
er
<
Char
>::
ParseHeader
(
unsigned
fmt
::
internal
::
Printf
Formatt
er
<
Char
>::
ParseHeader
(
const
Char
*&
s
,
FormatSpec
&
spec
,
const
char
*&
error
)
{
unsigned
arg_index
=
UINT_MAX
;
Char
c
=
*
s
;
...
...
@@ -769,7 +769,7 @@ unsigned fmt::internal::PrintfParser<Char>::ParseHeader(
// TODO: move to a base class that doesn't depend on template argument
template
<
typename
Char
>
const
Arg
&
fmt
::
internal
::
Printf
Pars
er
<
Char
>::
HandleArgIndex
(
const
Arg
&
fmt
::
internal
::
Printf
Formatt
er
<
Char
>::
HandleArgIndex
(
unsigned
arg_index
,
const
char
*&
error
)
{
if
(
arg_index
!=
UINT_MAX
)
{
if
(
next_arg_index_
<=
0
)
{
...
...
@@ -791,7 +791,7 @@ const Arg &fmt::internal::PrintfParser<Char>::HandleArgIndex(
}
template
<
typename
Char
>
void
fmt
::
internal
::
Printf
Pars
er
<
Char
>::
Format
(
void
fmt
::
internal
::
Printf
Formatt
er
<
Char
>::
Format
(
BasicWriter
<
Char
>
&
writer
,
BasicStringRef
<
Char
>
format
,
const
ArgList
&
args
)
{
const
Char
*
start
=
format
.
c_str
();
...
...
@@ -1166,7 +1166,7 @@ template fmt::BasicWriter<char>::CharPtr
template
void
fmt
::
BasicFormatter
<
char
>
::
Format
(
BasicStringRef
<
char
>
format
,
const
ArgList
&
args
);
template
void
fmt
::
internal
::
Printf
Pars
er
<
char
>
::
Format
(
template
void
fmt
::
internal
::
Printf
Formatt
er
<
char
>
::
Format
(
BasicWriter
<
char
>
&
writer
,
BasicStringRef
<
char
>
format
,
const
ArgList
&
args
);
// Explicit instantiations for wchar_t.
...
...
@@ -1178,7 +1178,7 @@ template fmt::BasicWriter<wchar_t>::CharPtr
template
void
fmt
::
BasicFormatter
<
wchar_t
>
::
Format
(
BasicStringRef
<
wchar_t
>
format
,
const
ArgList
&
args
);
template
void
fmt
::
internal
::
Printf
Pars
er
<
wchar_t
>
::
Format
(
template
void
fmt
::
internal
::
Printf
Formatt
er
<
wchar_t
>
::
Format
(
BasicWriter
<
wchar_t
>
&
writer
,
BasicStringRef
<
wchar_t
>
format
,
const
ArgList
&
args
);
...
...
format.h
View file @
9144a8fb
...
...
@@ -871,9 +871,9 @@ public:
};
namespace
internal
{
//
Printf format string pars
er.
//
A printf formatt
er.
template
<
typename
Char
>
class
Printf
Pars
er
{
class
Printf
Formatt
er
{
private:
ArgList
args_
;
int
next_arg_index_
;
...
...
@@ -1351,7 +1351,7 @@ class BasicWriter {
friend
class
internal
::
ArgFormatter
<
Char
>
;
friend
class
BasicFormatter
<
Char
>
;
friend
class
internal
::
Printf
Pars
er
<
Char
>
;
friend
class
internal
::
Printf
Formatt
er
<
Char
>
;
public:
/**
...
...
@@ -1800,7 +1800,7 @@ void print(std::ostream &os, StringRef format, const ArgList &args);
template
<
typename
Char
>
void
printf
(
BasicWriter
<
Char
>
&
w
,
BasicStringRef
<
Char
>
format
,
const
ArgList
&
args
)
{
internal
::
Printf
Pars
er
<
Char
>
().
Format
(
w
,
format
,
args
);
internal
::
Printf
Formatt
er
<
Char
>
().
Format
(
w
,
format
,
args
);
}
inline
std
::
string
sprintf
(
StringRef
format
,
const
ArgList
&
args
)
{
...
...
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