Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with constructors on GCC and Clang #31

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opennurbs_lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ class ON_CLASS ON_Lock
// needs to have dll-interface to be used by clients of class 'ON_Lock'
// m_lock_value is private and all code that manages m_lock_value is explicitly implemented in the DLL.
private:
#if defined(ON_COMPILER_CLANG)
std::atomic<int> m_lock_value;
#if defined(ON_CLANG_CONSTRUCTOR_BUG_INIT)
std::atomic<int> m_lock_value;
#else
std::atomic<int> m_lock_value = ON_Lock::UnlockedValue;
#endif
Expand Down
4 changes: 2 additions & 2 deletions opennurbs_statics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static ON_SHA1_Hash ON_SHA1_Hash_EmptyContentHash()
const ON_SHA1_Hash ON_SHA1_Hash::EmptyContentHash = ON_SHA1_Hash_EmptyContentHash();
const ON_SHA1_Hash ON_SHA1_Hash::ZeroDigest ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_SHA1_Hash);

const ONX_ModelTest ONX_ModelTest::Unset ON_CLANG_CONSTRUCTOR_BUG_INIT(ONX_ModelTest);
const ONX_ModelTest ONX_ModelTest::Unset = ONX_ModelTest();

// Works with Microsoft's CL, fails for Apple's CLang
//// const struct ON_UnicodeErrorParameters ON_UnicodeErrorParameters::MaskErrors = { 0, 0xFFFFFFFF, ON_UnicodeCodePoint::ON_ReplacementCharacter };
Expand Down Expand Up @@ -744,7 +744,7 @@ const ON_AngleUnitName ON_AngleUnitName::None ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_A
const ON_LengthValue ON_LengthValue::Unset ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_LengthValue);
const ON_LengthValue ON_LengthValue::Zero = ON_LengthValue::Create(0.0, ON::LengthUnitSystem::None, 0, ON_LengthValue::StringFormat::CleanDecimal);

const ON_AngleValue ON_AngleValue::Unset ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_AngleValue);
const ON_AngleValue ON_AngleValue::Unset = ON_AngleValue();
const ON_AngleValue ON_AngleValue::Zero = ON_AngleValue::Create(0.0, ON::AngleUnitSystem::None, 0, ON_AngleValue::StringFormat::CleanDecimal );

const ON_ScaleValue ON_ScaleValue::Unset ON_CLANG_CONSTRUCTOR_BUG_INIT(ON_ScaleValue);
Expand Down