diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 06:32:17 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 06:32:17 +0200 |
commit | f134100adcdaa5895edcf8819635b6d23e7c7efd (patch) | |
tree | 9ac78b2f91a03906b0baf5c4dade5bab78adac2d | |
parent | 1bb21a80f3173d4e1c254fddd803559bf84a364a (diff) |
irrelevant busywork
-rw-r--r-- | cmake/opentrack-platform.cmake | 6 | ||||
-rw-r--r-- | logic/pipeline.cpp | 18 | ||||
-rw-r--r-- | options/scoped.hpp | 2 |
3 files changed, 12 insertions, 14 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index de711ac4..c9bc2fca 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -128,12 +128,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS FALSE) foreach(k _RELEASE _DEBUG _RELWITHDEBINFO _MINSIZEREL) - set(CMAKE_C_FLAGS${k} "-UNDEBUG ${CMAKE_C_FLAGS${k}}") - set(CMAKE_CXX_FLAGS${k} "-UNDEBUG ${CMAKE_CXX_FLAGS${k}}") + set(CMAKE_C_FLAGS${k} "${CMAKE_C_FLAGS${k}} -UNDEBUG") + set(CMAKE_CXX_FLAGS${k} "${CMAKE_CXX_FLAGS${k}} -UNDEBUG") endforeach() -set_property(GLOBAL PROPERTY USE_FOLDERS OFF) - if(MINGW) add_definitions(-DMINGW_HAS_SECURE_API) add_definitions(-DSTRSAFE_NO_DEPRECATE) diff --git a/logic/pipeline.cpp b/logic/pipeline.cpp index a7cf0c4e..a7817bc8 100644 --- a/logic/pipeline.cpp +++ b/logic/pipeline.cpp @@ -75,7 +75,7 @@ euler_t reltrans::rotate(const rmat& R, const euler_t& in, vec3_bool disable) co Pose reltrans::apply_pipeline(reltrans_state state, const Pose& value, const vec6_bool& disable, bool neck_enable, int neck_z) { - euler_t rel((const double*)(value)); + euler_t rel((const double*)value); if (state != reltrans_disabled) { @@ -242,7 +242,7 @@ static cc_forceinline bool nan_check_(const x& datum) template<typename x, typename y, typename... xs> static cc_forceinline bool nan_check_(const x& datum, const y& next, const xs&... rest) { - return is_nan(datum) || nan_check_(next, rest...); + return is_nan(datum) ? true : nan_check_(next, rest...); } static cc_noinline @@ -270,13 +270,13 @@ bool maybe_nan(const char* text, const char* fun, int line, const xs&... vals) // for MSVC `else' is like `unlikely' for GNU -#define nan_check(...) \ - do \ - { \ - if (likely(!maybe_nan(#__VA_ARGS__, cc_function_name, __LINE__, __VA_ARGS__))) \ - (void)0; \ - else \ - goto error; \ +#define nan_check(...) \ + do \ + { \ + if (likely(!maybe_nan(#__VA_ARGS__, cc_function_name, __LINE__, __VA_ARGS__))) \ + (void)0; \ + else \ + goto error; \ } while (false) bool pipeline::maybe_enable_center_on_tracking_started() diff --git a/options/scoped.hpp b/options/scoped.hpp index 49c3d18f..452708f4 100644 --- a/options/scoped.hpp +++ b/options/scoped.hpp @@ -27,7 +27,7 @@ struct OTR_OPTIONS_EXPORT opts bundle b; virtual ~opts(); - opts(const QString& name); + explicit opts(const QString& name); opts& operator=(const opts&) = delete; opts(const opts&) = delete; |