2022-07-06 02:06:41 +08:00
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
|
|
index 0362420..2b09073 100644
|
|
|
|
--- a/CMakeLists.txt
|
|
|
|
+++ b/CMakeLists.txt
|
|
|
|
@@ -86,6 +86,10 @@ draco_set_cxx_flags()
|
|
|
|
draco_set_exe_linker_flags()
|
|
|
|
draco_generate_features_h()
|
|
|
|
|
|
|
|
+if (MSVC)
|
|
|
|
+ add_compile_options(/wd4996)
|
|
|
|
+endif()
|
|
|
|
+
|
|
|
|
# Draco source file listing variables.
|
|
|
|
list(APPEND draco_attributes_sources
|
|
|
|
"${draco_src_root}/attributes/attribute_octahedron_transform.cc"
|
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;
|
|
|
|
}
|
|
|
|
|