Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
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
json
Commits
e8356928
Unverified
Commit
e8356928
authored
Apr 19, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
fix compiler warnings #2052
parent
be137609
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
include/nlohmann/detail/output/serializer.hpp
include/nlohmann/detail/output/serializer.hpp
+1
-1
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+3
-4
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+4
-5
test/src/unit-allocator.cpp
test/src/unit-allocator.cpp
+3
-3
No files found.
include/nlohmann/detail/output/serializer.hpp
View file @
e8356928
...
...
@@ -862,7 +862,7 @@ class serializer
:
(
0xFFu
>>
type
)
&
(
byte
);
std
::
size_t
index
=
256u
+
static_cast
<
size_t
>
(
state
)
*
16u
+
static_cast
<
size_t
>
(
type
);
assert
(
0
<=
index
and
index
<
400
);
assert
(
index
<
400
);
state
=
utf8d
[
index
];
return
state
;
}
...
...
include/nlohmann/json.hpp
View file @
e8356928
...
...
@@ -890,9 +890,9 @@ class basic_json
struct
internal_binary_t
:
public
BinaryType
{
using
BinaryType
::
BinaryType
;
internal_binary_t
()
:
BinaryType
()
{}
internal_binary_t
(
BinaryType
const
&
bint
)
:
BinaryType
(
bint
)
{}
internal_binary_t
(
BinaryType
&&
bint
)
:
BinaryType
(
std
::
move
(
bint
))
{}
internal_binary_t
()
noexcept
(
noexcept
(
BinaryType
()))
:
BinaryType
()
{}
internal_binary_t
(
BinaryType
const
&
bint
)
noexcept
(
noexcept
(
BinaryType
(
bint
)))
:
BinaryType
(
bint
)
{}
internal_binary_t
(
BinaryType
&&
bint
)
noexcept
(
noexcept
(
BinaryType
(
std
::
move
(
bint
))))
:
BinaryType
(
std
::
move
(
bint
))
{}
// TOOD: If minimum C++ version is ever bumped to C++17, this field
// deserves to be a std::optional
...
...
@@ -6678,7 +6678,6 @@ class basic_json
input_format_t
format
=
input_format_t
::
json
,
const
bool
strict
=
true
)
{
assert
(
sax
);
return
format
==
input_format_t
::
json
?
parser
(
std
::
move
(
i
)).
sax_parse
(
sax
,
strict
)
:
detail
::
binary_reader
<
basic_json
,
SAX
>
(
std
::
move
(
i
)).
sax_parse
(
format
,
sax
,
strict
);
...
...
single_include/nlohmann/json.hpp
View file @
e8356928
...
...
@@ -15495,7 +15495,7 @@ class serializer
:
(
0xFFu
>>
type
)
&
(
byte
);
std
::
size_t
index
=
256u
+
static_cast
<
size_t
>
(
state
)
*
16u
+
static_cast
<
size_t
>
(
type
);
assert
(
0
<=
index
and
index
<
400
);
assert
(
index
<
400
);
state
=
utf8d
[
index
];
return
state
;
}
...
...
@@ -16377,9 +16377,9 @@ class basic_json
struct
internal_binary_t
:
public
BinaryType
{
using
BinaryType
::
BinaryType
;
internal_binary_t
()
:
BinaryType
()
{}
internal_binary_t
(
BinaryType
const
&
bint
)
:
BinaryType
(
bint
)
{}
internal_binary_t
(
BinaryType
&&
bint
)
:
BinaryType
(
std
::
move
(
bint
))
{}
internal_binary_t
()
noexcept
(
noexcept
(
BinaryType
()))
:
BinaryType
()
{}
internal_binary_t
(
BinaryType
const
&
bint
)
noexcept
(
noexcept
(
BinaryType
(
bint
)))
:
BinaryType
(
bint
)
{}
internal_binary_t
(
BinaryType
&&
bint
)
noexcept
(
noexcept
(
BinaryType
(
std
::
move
(
bint
))))
:
BinaryType
(
std
::
move
(
bint
))
{}
// TOOD: If minimum C++ version is ever bumped to C++17, this field
// deserves to be a std::optional
...
...
@@ -22165,7 +22165,6 @@ class basic_json
input_format_t
format
=
input_format_t
::
json
,
const
bool
strict
=
true
)
{
assert
(
sax
);
return
format
==
input_format_t
::
json
?
parser
(
std
::
move
(
i
)).
sax_parse
(
sax
,
strict
)
:
detail
::
binary_reader
<
basic_json
,
SAX
>
(
std
::
move
(
i
)).
sax_parse
(
format
,
sax
,
strict
);
...
...
test/src/unit-allocator.cpp
View file @
e8356928
...
...
@@ -272,8 +272,8 @@ TEST_CASE("bad my_allocator::construct")
double
,
allocator_no_forward
>
;
bad_alloc_json
j
son
;
j
son
[
"test"
]
=
bad_alloc_json
::
array_t
();
j
son
[
"test"
].
push_back
(
"should not leak"
);
bad_alloc_json
j
;
j
[
"test"
]
=
bad_alloc_json
::
array_t
();
j
[
"test"
].
push_back
(
"should not leak"
);
}
}
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