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
22de5a75
Commit
22de5a75
authored
Feb 02, 2019
by
Elias Kosunen
Committed by
Victor Zverovich
Feb 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings from Travis
parent
355eb6d2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
9 deletions
+4
-9
include/fmt/prepare.h
include/fmt/prepare.h
+0
-1
test/ostream-test.cc
test/ostream-test.cc
+1
-1
test/prepare-test.cc
test/prepare-test.cc
+3
-7
No files found.
include/fmt/prepare.h
View file @
22de5a75
...
...
@@ -383,7 +383,6 @@ template <typename Format> class compiletime_prepared_parts_type_provider {
private:
FMT_CONSTEXPR
const
char_type
*
find_matching_brace
(
const
char_type
*
begin
,
const
char_type
*
end
)
{
FMT_CONSTEXPR_DECL
const
basic_string_view
<
char_type
>
text
=
Format
{};
unsigned
braces_counter
{
0u
};
for
(;
begin
!=
end
;
++
begin
)
{
if
(
*
begin
==
'{'
)
{
...
...
test/ostream-test.cc
View file @
22de5a75
...
...
@@ -154,7 +154,7 @@ TEST(OStreamTest, WriteToOStreamMaxSize) {
EXPECT_CALL
(
streambuf
,
xsputn
(
data
,
static_cast
<
std
::
streamsize
>
(
n
)))
.
WillOnce
(
testing
::
Return
(
max_streamsize
));
data
+=
n
;
size
-=
static_cast
<
std
::
size_t
>
(
n
)
;
size
-=
n
;
}
while
(
size
!=
0
);
fmt
::
internal
::
write
(
os
,
buffer
);
}
...
...
test/prepare-test.cc
View file @
22de5a75
...
...
@@ -169,7 +169,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) {
auto
rhs
=
format_part
(
specs
);
EXPECT_EQ
(
lhs
,
rhs
);
const
auto
specs_text
=
fmt
::
string_view
(
"<10"
);
specs
.
parsed_specs
=
prepared_specs
();
lhs
=
format_part
(
specs
);
rhs
=
format_part
(
specs
);
...
...
@@ -191,8 +190,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) {
rhs
=
format_part
(
rhs_spec
);
EXPECT_NE
(
lhs
,
rhs
);
const
auto
lhs_specs_text
=
fmt
::
string_view
(
"<10"
);
const
auto
rhs_specs_text
=
fmt
::
string_view
(
"<42"
);
lhs_spec
=
format_part
::
specification
(
specs_argument_id
);
rhs_spec
=
format_part
::
specification
(
specs_argument_id
);
lhs_spec
.
parsed_specs
.
precision
=
1
;
...
...
@@ -202,7 +199,6 @@ TEST(PrepareTest, FormatPart_ComparisonOperators) {
EXPECT_NE
(
lhs
,
rhs
);
}
{
const
auto
specs_text
=
fmt
::
string_view
{
"<10"
};
const
auto
specs_argument_id
=
0u
;
const
auto
specs_named_argument_id
=
fmt
::
internal
::
string_view_metadata
(
0
,
42
);
...
...
@@ -623,7 +619,7 @@ template <typename T> struct user_allocator {
template
<
typename
U
>
user_allocator
(
const
user_allocator
<
U
>&
)
{}
pointer
allocate
(
size_type
cnt
,
typename
std
::
allocator
<
void
>::
const_pointer
=
0
)
{
typename
std
::
allocator
<
void
>::
const_pointer
=
FMT_NULL
)
{
return
new
value_type
[
cnt
];
}
...
...
@@ -633,8 +629,8 @@ template <typename T> struct user_allocator {
void
destroy
(
pointer
p
)
{
(
*
p
).
~
value_type
();
}
bool
operator
==
(
const
user_allocator
&
other
)
const
{
return
true
;
}
bool
operator
!=
(
const
user_allocator
&
other
)
const
{
return
false
;
}
bool
operator
==
(
const
user_allocator
&
)
const
{
return
true
;
}
bool
operator
!=
(
const
user_allocator
&
)
const
{
return
false
;
}
};
TEST
(
PrepareTest
,
PassUserTypeFormat
)
{
...
...
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