2022-07-06 02:06:41 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
2023-05-06 01:55:33 +08:00
|
|
|
index a93267d..3a3ccf7 100644
|
2022-07-06 02:06:41 +08:00
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
2023-05-06 01:55:33 +08:00
|
|
|
@@ -85,6 +85,9 @@ draco_set_cxx_flags()
|
2022-07-06 02:06:41 +08:00
|
|
|
draco_set_exe_linker_flags()
|
|
|
|
draco_generate_features_h()
|
|
|
|
|
|
|
|
+if (MSVC)
|
|
|
|
+ add_compile_options(/wd4996)
|
|
|
|
+endif()
|
|
|
|
# Draco source file listing variables.
|
2023-05-06 01:55:33 +08:00
|
|
|
list(
|
|
|
|
APPEND draco_attributes_sources
|
2019-06-07 10:03:08 +08:00
|
|
|
diff --git a/src/draco/io/parser_utils.cc b/src/draco/io/parser_utils.cc
|
2022-07-06 02:06:41 +08:00
|
|
|
index 378de73..be7e032 100644
|
2019-06-07 10:03:08 +08:00
|
|
|
--- a/src/draco/io/parser_utils.cc
|
|
|
|
+++ b/src/draco/io/parser_utils.cc
|
2021-09-28 11:53:48 +08:00
|
|
|
@@ -152,7 +152,9 @@ bool ParseSignedInt(DecoderBuffer *buffer, int32_t *value) {
|
2020-09-28 08:59:45 +08:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|