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
2e281ba6
Commit
2e281ba6
authored
Oct 18, 2017
by
Niels Lohmann
Committed by
GitHub
Oct 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #788 from jseward/develop
Fix Visual Studio 2017 warnings
parents
7c8f0a41
a99fcb4e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
3 deletions
+15
-3
src/json.hpp
src/json.hpp
+1
-1
test/CMakeLists.txt
test/CMakeLists.txt
+4
-1
test/src/unit-constructor1.cpp
test/src/unit-constructor1.cpp
+1
-1
test/src/unit-readme.cpp
test/src/unit-readme.cpp
+9
-0
No files found.
src/json.hpp
View file @
2e281ba6
...
...
@@ -5292,7 +5292,7 @@ class binary_reader
{
get
();
check_eof
();
return
current
;
return
static_cast
<
char
>
(
current
)
;
});
return
result
;
}
...
...
test/CMakeLists.txt
View file @
2e281ba6
...
...
@@ -76,7 +76,10 @@ if(MSVC)
endif
()
# Disable warning C4389: '==': signed/unsigned mismatch
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4389"
)
# Disable warning C4309: 'static_cast': truncation of constant value
# Disable warning C4566: character represented by universal-character-name '\uFF01' cannot be represented in the current code page (1252)
# Disable warning C4996: 'nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer>::operator <<': was declared deprecated
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4389 /wd4309 /wd4566 /wd4996"
)
endif
()
#############################################################################
...
...
test/src/unit-constructor1.cpp
View file @
2e281ba6
...
...
@@ -242,7 +242,7 @@ TEST_CASE("constructors")
SECTION
(
"std::pair"
)
{
std
::
pair
<
float
,
std
::
string
>
p
{
1.0
,
"string"
};
std
::
pair
<
float
,
std
::
string
>
p
{
1.0
f
,
"string"
};
json
j
(
p
);
CHECK
(
j
.
type
()
==
json
::
value_t
::
array
);
...
...
test/src/unit-readme.cpp
View file @
2e281ba6
...
...
@@ -38,6 +38,11 @@ using nlohmann::json;
#include <unordered_set>
#include <iostream>
#if defined(_MSC_VER)
#pragma warning (push)
#pragma warning (disable : 4189) // local variable is initialized but not referenced
#endif
TEST_CASE
(
"README"
,
"[hide]"
)
{
{
...
...
@@ -298,3 +303,7 @@ TEST_CASE("README", "[hide]")
std
::
cout
.
rdbuf
(
old_cout_buffer
);
}
}
#if defined(_MSC_VER)
#pragma warning (pop)
#endif
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