Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
畅游知识海洋
json
提交
917d9d8b
J
json
项目概览
畅游知识海洋
/
json
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
json
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
917d9d8b
编写于
10月 16, 2017
作者:
J
Jamie Seward
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Visual Studio 2017 warnings
上级
af990907
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
4 deletion
+16
-4
src/json.hpp
src/json.hpp
+1
-1
test/CMakeLists.txt
test/CMakeLists.txt
+5
-2
test/src/unit-constructor1.cpp
test/src/unit-constructor1.cpp
+1
-1
test/src/unit-readme.cpp
test/src/unit-readme.cpp
+9
-0
未找到文件。
src/json.hpp
浏览文件 @
917d9d8b
...
...
@@ -5292,7 +5292,7 @@ class binary_reader
{
get
();
check_eof
();
return
current
;
return
static_cast
<
char
>
(
current
)
;
});
return
result
;
}
...
...
test/CMakeLists.txt
浏览文件 @
917d9d8b
...
...
@@ -75,8 +75,11 @@ if(MSVC)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/W4"
)
endif
()
# Disable warning C4389: '==': signed/unsigned mismatch
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
/wd4389"
)
# warning C4389: '==': signed/unsigned mismatch
# warning C4309: 'static_cast': truncation of constant value
# warning C4566: character represented by universal-character-name '\uFF01' cannot be represented in the current code page (1252)
# 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
浏览文件 @
917d9d8b
...
...
@@ -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
浏览文件 @
917d9d8b
...
...
@@ -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
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录