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
fb9015b3
Commit
fb9015b3
authored
Oct 19, 2016
by
Victor Zverovich
Committed by
Jonathan Müller
Oct 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CHAR_WIDTH -> CHAR_SIZE to avoid collision with ISO/IEC TS 18661-1:2014 macro
(cherry picked from commit
abbefd71
)
parent
0a0c2c9c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
fmt/format.h
fmt/format.h
+8
-8
No files found.
fmt/format.h
View file @
fb9015b3
...
@@ -1869,21 +1869,21 @@ class ArgFormatterBase : public ArgVisitor<Impl, void> {
...
@@ -1869,21 +1869,21 @@ class ArgFormatterBase : public ArgVisitor<Impl, void> {
typedef
typename
BasicWriter
<
Char
>::
CharPtr
CharPtr
;
typedef
typename
BasicWriter
<
Char
>::
CharPtr
CharPtr
;
Char
fill
=
internal
::
CharTraits
<
Char
>::
cast
(
spec_
.
fill
());
Char
fill
=
internal
::
CharTraits
<
Char
>::
cast
(
spec_
.
fill
());
CharPtr
out
=
CharPtr
();
CharPtr
out
=
CharPtr
();
const
unsigned
CHAR_
WIDTH
=
1
;
const
unsigned
CHAR_
SIZE
=
1
;
if
(
spec_
.
width_
>
CHAR_
WIDTH
)
{
if
(
spec_
.
width_
>
CHAR_
SIZE
)
{
out
=
writer_
.
grow_buffer
(
spec_
.
width_
);
out
=
writer_
.
grow_buffer
(
spec_
.
width_
);
if
(
spec_
.
align_
==
ALIGN_RIGHT
)
{
if
(
spec_
.
align_
==
ALIGN_RIGHT
)
{
std
::
uninitialized_fill_n
(
out
,
spec_
.
width_
-
CHAR_
WIDTH
,
fill
);
std
::
uninitialized_fill_n
(
out
,
spec_
.
width_
-
CHAR_
SIZE
,
fill
);
out
+=
spec_
.
width_
-
CHAR_
WIDTH
;
out
+=
spec_
.
width_
-
CHAR_
SIZE
;
}
else
if
(
spec_
.
align_
==
ALIGN_CENTER
)
{
}
else
if
(
spec_
.
align_
==
ALIGN_CENTER
)
{
out
=
writer_
.
fill_padding
(
out
,
spec_
.
width_
,
out
=
writer_
.
fill_padding
(
out
,
spec_
.
width_
,
internal
::
const_check
(
CHAR_
WIDTH
),
fill
);
internal
::
const_check
(
CHAR_
SIZE
),
fill
);
}
else
{
}
else
{
std
::
uninitialized_fill_n
(
out
+
CHAR_
WIDTH
,
std
::
uninitialized_fill_n
(
out
+
CHAR_
SIZE
,
spec_
.
width_
-
CHAR_
WIDTH
,
fill
);
spec_
.
width_
-
CHAR_
SIZE
,
fill
);
}
}
}
else
{
}
else
{
out
=
writer_
.
grow_buffer
(
CHAR_
WIDTH
);
out
=
writer_
.
grow_buffer
(
CHAR_
SIZE
);
}
}
*
out
=
internal
::
CharTraits
<
Char
>::
cast
(
value
);
*
out
=
internal
::
CharTraits
<
Char
>::
cast
(
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