2019-06-07 10:03:08 +08:00
|
|
|
diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc
|
2020-09-28 08:59:45 +08:00
|
|
|
index 6e42a58..3c302b9 100644
|
2019-06-07 10:03:08 +08:00
|
|
|
--- a/src/draco/io/parser_utils.cc
|
|
|
|
+++ b/src/draco/io/parser_utils.cc
|
2020-09-28 08:59:45 +08:00
|
|
|
@@ -160,7 +160,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) {
|
|
|
|
if (!ParseUnsignedInt(buffer, &v)) {
|
2019-06-07 10:03:08 +08:00
|
|
|
return false;
|
2020-09-28 08:59:45 +08:00
|
|
|
}
|
2019-06-07 10:03:08 +08:00
|
|
|
- *value = (sign < 0) ? -v : v;
|
|
|
|
+ if (sign < 0)
|
|
|
|
+ v *= -1;
|
|
|
|
+ *value = v;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-09-28 08:59:45 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 7e79da7..c4d9880 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -153,6 +153,10 @@ if(ENABLE_EXTRA_SPEED)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
+if (MSVC)
|
|
|
|
+ add_compile_options(/wd4996)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
# Generate a version file containing repository info.
|
|
|
|
include(FindGit)
|
|
|
|
find_package(Git)
|