Skip to content

Commit

Permalink
[openNURBS] Update workaround condition from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
WangWeiLin-MV authored Oct 17, 2024
1 parent 9e48412 commit dd96e9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions surface/src/3rdparty/opennurbs/opennurbs_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,9 +666,13 @@ std::size_t ON_SerialNumberMap::ActiveIdCount() const
return m_active_id_count;
}

#if (_MSC_VER >= 1930 && _MSC_VER <= 1941)
#if _MSC_VER >= 1930
// Solves internal compiler error on MSVC 2022
// (see https://github.com/microsoft/vcpkg/issues/19561)
#define ON_VS2022_COMPILER_CRASH
#endif

#if defined(ON_VS2022_COMPILER_CRASH)
#pragma optimize("", off)
#endif
struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
Expand Down Expand Up @@ -722,7 +726,7 @@ struct ON_SerialNumberMap::SN_ELEMENT* ON_SerialNumberMap::FirstElement() const
}
return e;
}
#if (_MSC_VER >= 1930 && _MSC_VER <= 1941)
#if defined(ON_VS2022_COMPILER_CRASH)
#pragma optimize("", on)
#endif

Expand Down

0 comments on commit dd96e9f

Please sign in to comment.