From 7c8cd7427145674d5a3278a917c79cc31d024dc6 Mon Sep 17 00:00:00 2001 From: Ondrej Stava Date: Tue, 1 Aug 2017 11:37:58 -0700 Subject: [PATCH] Fixed Visual Studio build + updated makefiles --- CMakeLists.txt | 1 - Makefile.decoder.emcc | 1 - Makefile.encoder.emcc | 1 - src/draco/core/statusor.h | 15 +++------------ 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10ecc2a..35349dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,6 @@ if (ENABLE_MESH_COMPRESSION) endif () endif () - # Turn on more compiler warnings. if (ENABLE_EXTRA_WARNINGS) if (MSVC) diff --git a/Makefile.decoder.emcc b/Makefile.decoder.emcc index 39f5a9a..772e392 100644 --- a/Makefile.decoder.emcc +++ b/Makefile.decoder.emcc @@ -38,7 +38,6 @@ endif ######### DEFINES := $(DRACO_CONFIG_DEFINES) -DEFINES += -DDRACO_INTERNAL_1_0_0 INCLUDES := -I../../ -I./ -I./src/ SRCDIR := src/draco OBJDIR := obj diff --git a/Makefile.encoder.emcc b/Makefile.encoder.emcc index afd2325..4c50ea1 100644 --- a/Makefile.encoder.emcc +++ b/Makefile.encoder.emcc @@ -38,7 +38,6 @@ endif ######### DEFINES := $(DRACO_CONFIG_DEFINES) -DEFINES += -DDRACO_INTERNAL_1_0_0 INCLUDES := -I../../ -I./ -I./src/ SRCDIR := src/draco OBJDIR := obj diff --git a/src/draco/core/statusor.h b/src/draco/core/statusor.h index 3ec540b..7fa4209 100644 --- a/src/draco/core/statusor.h +++ b/src/draco/core/statusor.h @@ -58,22 +58,13 @@ class StatusOr { }; // In case StatusOr is ok(), this macro assigns value stored in StatusOr -// to |lhs|, otherwise it returns the error Status. |error_expression| can be -// used to provide custom return expressions. +// to |lhs|, otherwise it returns the error Status. // // DRACO_ASSIGN_OR_RETURN(lhs, expression) -// DRACO_ASSIGN_OR_RETURN(lhs, expression, error_expression); // -#define DRACO_ASSIGN_OR_RETURN(...) \ - DRACO_SELECT_NTH_FROM_3(__VA_ARGS__, DRACO_ASSIGN_OR_RETURN_3_, \ - DRACO_ASSIGN_OR_RETURN_2_) \ - (__VA_ARGS__) -#define DRACO_ASSIGN_OR_RETURN_2_(lhs, expression) \ - DRACO_ASSIGN_OR_RETURN_3_(lhs, expression, _status) - -#define DRACO_ASSIGN_OR_RETURN_3_(lhs, expression, error_expression) \ +#define DRACO_ASSIGN_OR_RETURN(lhs, expression) \ DRACO_ASSIGN_OR_RETURN_IMPL_(DRACO_MACROS_IMPL_CONCAT_(_statusor, __LINE__), \ - lhs, expression, error_expression) + lhs, expression, _status) // The actual implementation of the above macro. #define DRACO_ASSIGN_OR_RETURN_IMPL_(statusor, lhs, expression, error_expr) \