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
dd8cb2ac
Unverified
Commit
dd8cb2ac
authored
Aug 10, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚨
remove -Wimplicit-fallthrough warning #2348
parent
1b28a582
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
12 deletions
+16
-12
include/nlohmann/detail/hash.hpp
include/nlohmann/detail/hash.hpp
+6
-5
include/nlohmann/detail/input/binary_reader.hpp
include/nlohmann/detail/input/binary_reader.hpp
+2
-1
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+8
-6
No files found.
include/nlohmann/detail/hash.hpp
View file @
dd8cb2ac
...
@@ -83,19 +83,19 @@ std::size_t hash(const BasicJsonType& j)
...
@@ -83,19 +83,19 @@ std::size_t hash(const BasicJsonType& j)
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann
:
:
detail
::
value_t
::
number_unsigned
:
case
BasicJsonType
:
:
value_t
::
number_unsigned
:
{
{
const
auto
h
=
std
::
hash
<
number_unsigned_t
>
{}(
j
.
template
get
<
number_unsigned_t
>());
const
auto
h
=
std
::
hash
<
number_unsigned_t
>
{}(
j
.
template
get
<
number_unsigned_t
>());
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann
:
:
detail
::
value_t
::
number_float
:
case
BasicJsonType
:
:
value_t
::
number_float
:
{
{
const
auto
h
=
std
::
hash
<
number_float_t
>
{}(
j
.
template
get
<
number_float_t
>());
const
auto
h
=
std
::
hash
<
number_float_t
>
{}(
j
.
template
get
<
number_float_t
>());
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann
:
:
detail
::
value_t
::
binary
:
case
BasicJsonType
:
:
value_t
::
binary
:
{
{
auto
seed
=
combine
(
type
,
j
.
get_binary
().
size
());
auto
seed
=
combine
(
type
,
j
.
get_binary
().
size
());
const
auto
h
=
std
::
hash
<
bool
>
{}(
j
.
get_binary
().
has_subtype
());
const
auto
h
=
std
::
hash
<
bool
>
{}(
j
.
get_binary
().
has_subtype
());
...
@@ -110,6 +110,7 @@ std::size_t hash(const BasicJsonType& j)
...
@@ -110,6 +110,7 @@ std::size_t hash(const BasicJsonType& j)
default:
// LCOV_EXCL_LINE
default:
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
return
0
;
// LCOV_EXCL_LINE
}
}
}
}
...
...
include/nlohmann/detail/input/binary_reader.hpp
View file @
dd8cb2ac
...
@@ -754,6 +754,7 @@ class binary_reader
...
@@ -754,6 +754,7 @@ class binary_reader
default:
// LCOV_EXCL_LINE
default:
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
return
false
;
// LCOV_EXCL_LINE
}
}
}
}
...
...
single_include/nlohmann/json.hpp
View file @
dd8cb2ac
...
@@ -4666,19 +4666,19 @@ std::size_t hash(const BasicJsonType& j)
...
@@ -4666,19 +4666,19 @@ std::size_t hash(const BasicJsonType& j)
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann::detail
::value_t::number_unsigned:
case
BasicJsonType
:
:
value_t
::
number_unsigned
:
{
{
const
auto
h
=
std
::
hash
<
number_unsigned_t
>
{}(
j
.
template
get
<
number_unsigned_t
>());
const
auto
h
=
std
::
hash
<
number_unsigned_t
>
{}(
j
.
template
get
<
number_unsigned_t
>());
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann::detail
::value_t::number_float:
case
BasicJsonType
:
:
value_t
::
number_float
:
{
{
const
auto
h
=
std
::
hash
<
number_float_t
>
{}(
j
.
template
get
<
number_float_t
>());
const
auto
h
=
std
::
hash
<
number_float_t
>
{}(
j
.
template
get
<
number_float_t
>());
return
combine
(
type
,
h
);
return
combine
(
type
,
h
);
}
}
case
nlohmann::detail
::value_t::binary:
case
BasicJsonType
:
:
value_t
::
binary
:
{
{
auto
seed
=
combine
(
type
,
j
.
get_binary
().
size
());
auto
seed
=
combine
(
type
,
j
.
get_binary
().
size
());
const
auto
h
=
std
::
hash
<
bool
>
{}(
j
.
get_binary
().
has_subtype
());
const
auto
h
=
std
::
hash
<
bool
>
{}(
j
.
get_binary
().
has_subtype
());
...
@@ -4693,6 +4693,7 @@ std::size_t hash(const BasicJsonType& j)
...
@@ -4693,6 +4693,7 @@ std::size_t hash(const BasicJsonType& j)
default:
// LCOV_EXCL_LINE
default:
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
return
0
;
// LCOV_EXCL_LINE
}
}
}
}
...
@@ -8393,6 +8394,7 @@ class binary_reader
...
@@ -8393,6 +8394,7 @@ class binary_reader
default:
// LCOV_EXCL_LINE
default:
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
JSON_ASSERT
(
false
);
// LCOV_EXCL_LINE
return
false
;
// LCOV_EXCL_LINE
}
}
}
}
...
...
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