From 30283a8a2c8bdc456bd449163284ac1d2b004de9 Mon Sep 17 00:00:00 2001 From: Will Pearson Date: Tue, 11 Jun 2019 13:41:36 +0100 Subject: [PATCH] More fixes --- opennurbs_subd_fragment.cpp | 2 +- opennurbs_system.h | 4 ++++ opennurbs_system_compiler.h | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/opennurbs_subd_fragment.cpp b/opennurbs_subd_fragment.cpp index 798b84af..2c70e316 100644 --- a/opennurbs_subd_fragment.cpp +++ b/opennurbs_subd_fragment.cpp @@ -1554,7 +1554,7 @@ bool ON_SubDLimitMesh::GetFaceCenterPointAndNormal( const unsigned int n = fragment->m_grid.m_side_segment_count; const unsigned int P_dex = fragment->IsCompleteFragment() ? (n*(n + 2) / 2) : 0; if (P_dex >= (unsigned int)fragment->m_P_count) - return nullptr; + return false; const double* fragment_P = fragment->m_P + (P_dex * fragment->m_P_stride); const double* fragment_N = fragment->m_N + (P_dex * fragment->m_N_stride); if (nullptr != P) diff --git a/opennurbs_system.h b/opennurbs_system.h index 504fea2f..fcda122c 100644 --- a/opennurbs_system.h +++ b/opennurbs_system.h @@ -520,6 +520,10 @@ typedef ON__UINT32 wchar_t; #include #pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE +#pragma ON_PRAGMA_WARNING_BEFORE_DIRTY_INCLUDE +#include +#pragma ON_PRAGMA_WARNING_AFTER_DIRTY_INCLUDE + #endif #if defined(ON_COMPILER_CLANG) diff --git a/opennurbs_system_compiler.h b/opennurbs_system_compiler.h index c03e7694..e3ac058b 100644 --- a/opennurbs_system_compiler.h +++ b/opennurbs_system_compiler.h @@ -373,7 +373,8 @@ #define ON_PRAGMA_WARNING_PUSH GCC diagnostic push // Gnu gcc warning state push #define ON_PRAGMA_WARNING_POP GCC diagnostic pop // Gnu gcc warning state pop #define ON_PRAGMA_WARNING_DISABLE_GNU(ON_PRAGMA_WARNING_DISABLE_param) GCC diagnostic ignored ON_PRAGMA_WARNING_DISABLE_param // Apple CLang warning disable - +// same as for clang, see above +#define ON_CLANG_CONSTRUCTOR_BUG #if defined(__GNUC__) && (__GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 7)) // C++11 noexcept and Rvalue references are in gcc 4.7 and later