mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-31 16:26:51 +08:00
Merge pull request #114 from mcneel/update-1762342811-v8.23.25251.13001
Sync changes from upstream repository
This commit is contained in:
@@ -227,7 +227,7 @@ bool ON_3dmObjectAttributes::operator==(const ON_3dmObjectAttributes& other) con
|
||||
if ( m_viewport_id != other.m_viewport_id )
|
||||
return false;
|
||||
|
||||
if ( m_dmref != other.m_dmref )
|
||||
if (!ON_SimpleArray_IsEqual(m_dmref, other.m_dmref))
|
||||
return false;
|
||||
|
||||
if (m_object_frame != other.m_object_frame)
|
||||
|
||||
@@ -380,6 +380,12 @@ public:
|
||||
*/
|
||||
void SetArray(T*, int, int);
|
||||
|
||||
//Deleted these two functions because the compiler was actually using pointer
|
||||
//comparison on m_a. Adding implementations for these in Rhino 8 is cumbersome because
|
||||
//of the template initialization stuff, so use ON_SimpleArray_IsEqual for now.
|
||||
bool operator==(const ON_SimpleArray<T>& other) const = delete;
|
||||
bool operator!=(const ON_SimpleArray<T>& other) const = delete;
|
||||
|
||||
protected:
|
||||
// implementation //////////////////////////////////////////////////////
|
||||
void Move( int /* dest index*/, int /* src index */, int /* element count*/ );
|
||||
@@ -388,6 +394,24 @@ protected:
|
||||
int m_capacity; // actual length of m_a[]
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool ON_SimpleArray_IsEqual(const ON_SimpleArray<T>& first, const ON_SimpleArray<T>& second)
|
||||
{
|
||||
if (first.Count() != second.Count())
|
||||
return false;
|
||||
|
||||
const int count = first.Count();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//Use operator== because it's more common
|
||||
if (!(first[i] == second[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -733,6 +757,14 @@ public:
|
||||
*/
|
||||
void SetArray(T*, int, int);
|
||||
|
||||
//Deleted these two functions because the compiler was actually using pointer
|
||||
//comparison on m_a. Adding implementations for these in Rhino 8 is cumbersome because
|
||||
//of the template initialization stuff, so use ON_ClassArray_IsEqual for now.
|
||||
bool operator==(const ON_ClassArray<T>& other) const = delete;
|
||||
bool operator!=(const ON_ClassArray<T>& other) const = delete;
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
// implementation //////////////////////////////////////////////////////
|
||||
void Move( int /* dest index*/, int /* src index */, int /* element count*/ );
|
||||
@@ -743,6 +775,24 @@ protected:
|
||||
int m_capacity; // actual length of m_a[]
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
bool ON_ClassArray_IsEqual(const ON_ClassArray<T>& first, const ON_ClassArray<T>& second)
|
||||
{
|
||||
if (first.Count() != second.Count())
|
||||
return false;
|
||||
|
||||
const int count = first.Count();
|
||||
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//Use operator== because it's more common
|
||||
if (!(first[i] == second[i]))
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(ON_DLL_TEMPLATE)
|
||||
|
||||
ON_DLL_TEMPLATE template class ON_CLASS ON_ClassArray<ON_String>;
|
||||
|
||||
@@ -231,7 +231,7 @@ bool ON_HatchLine::operator==(const ON_HatchLine& src) const
|
||||
m_angle_radians == src.m_angle_radians
|
||||
&& m_base == src.m_base
|
||||
&& m_offset == src.m_offset
|
||||
&& m_dashes == src.m_dashes
|
||||
&& ON_SimpleArray_IsEqual(m_dashes, src.m_dashes)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ bool ON_HatchLine::operator!=(const ON_HatchLine& src) const
|
||||
m_angle_radians != src.m_angle_radians
|
||||
|| m_base != src.m_base
|
||||
|| m_offset != src.m_offset
|
||||
|| m_dashes != src.m_dashes
|
||||
|| !ON_SimpleArray_IsEqual(m_dashes, src.m_dashes)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1659,12 +1659,12 @@ private:
|
||||
unsigned int m_reserved4 = 0;
|
||||
};
|
||||
|
||||
bool operator==(
|
||||
ON_DECL bool operator==(
|
||||
const ON_ModelComponentContentMark& lhs,
|
||||
const ON_ModelComponentContentMark& rhs
|
||||
);
|
||||
|
||||
bool operator!=(
|
||||
ON_DECL bool operator!=(
|
||||
const ON_ModelComponentContentMark& lhs,
|
||||
const ON_ModelComponentContentMark& rhs
|
||||
);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
// To update version numbers, edit ..\build\build_dates.msbuild
|
||||
#define RMA_VERSION_MAJOR 8
|
||||
#define RMA_VERSION_MINOR 22
|
||||
#define RMA_VERSION_MINOR 23
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -14,10 +14,10 @@
|
||||
// first step in each build.
|
||||
//
|
||||
#define RMA_VERSION_YEAR 2025
|
||||
#define RMA_VERSION_MONTH 8
|
||||
#define RMA_VERSION_DATE 5
|
||||
#define RMA_VERSION_HOUR 12
|
||||
#define RMA_VERSION_MINUTE 45
|
||||
#define RMA_VERSION_MONTH 9
|
||||
#define RMA_VERSION_DATE 8
|
||||
#define RMA_VERSION_HOUR 13
|
||||
#define RMA_VERSION_MINUTE 0
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -35,8 +35,8 @@
|
||||
// 3 = build system release build
|
||||
#define RMA_VERSION_BRANCH 0
|
||||
|
||||
#define VERSION_WITH_COMMAS 8,22,25217,12450
|
||||
#define VERSION_WITH_PERIODS 8.22.25217.12450
|
||||
#define VERSION_WITH_COMMAS 8,23,25251,13000
|
||||
#define VERSION_WITH_PERIODS 8.23.25251.13000
|
||||
#define COPYRIGHT "Copyright (C) 1993-2025, Robert McNeel & Associates. All Rights Reserved."
|
||||
#define SPECIAL_BUILD_DESCRIPTION "Public OpenNURBS C++ 3dm file IO library."
|
||||
|
||||
@@ -44,11 +44,11 @@
|
||||
#define RMA_VERSION_NUMBER_MAJOR_WSTRING L"8"
|
||||
#define RMA_PREVIOUS_VERSION_NUMBER_MAJOR_WSTRING L"7"
|
||||
|
||||
#define RMA_VERSION_NUMBER_SR_STRING "SR22"
|
||||
#define RMA_VERSION_NUMBER_SR_WSTRING L"SR22"
|
||||
#define RMA_VERSION_NUMBER_SR_STRING "SR23"
|
||||
#define RMA_VERSION_NUMBER_SR_WSTRING L"SR23"
|
||||
|
||||
#define RMA_VERSION_WITH_PERIODS_STRING "8.22.25217.12450"
|
||||
#define RMA_VERSION_WITH_PERIODS_WSTRING L"8.22.25217.12450"
|
||||
#define RMA_VERSION_WITH_PERIODS_STRING "8.23.25251.13000"
|
||||
#define RMA_VERSION_WITH_PERIODS_WSTRING L"8.23.25251.13000"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user