Skip to content

Commit

Permalink
[openNURBS] Update optimizer workaround condition from upstream (#6154)
Browse files Browse the repository at this point in the history
* [openNURBS] Update workaround condition from upstream

* [openNURBS] Update workaround condition before _MSC_VER 1950
  • Loading branch information
WangWeiLin-MV authored Dec 25, 2024
1 parent 9f09199 commit cc08f81
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 && _MSC_VER <= 1949)
// 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 cc08f81

Please sign in to comment.