Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cocos/base/ccMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ CC_ASSERT(__gl_error_code == GL_NO_ERROR, "Error"); \
/*********************************/
/** 64bits Program Sense Macros **/
/*********************************/
#if defined(_M_X64) || defined(_WIN64) || defined(__LP64__) || defined(_LP64) || defined(__x86_64)
#if defined(_M_X64) || defined(_WIN64) || defined(__LP64__) || defined(_LP64) || defined(__x86_64) || defined(__arm64__) || defined(__aarch64__)
#define CC_64BITS 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you explain why we need CC_64BITS define at all?

In code I see only

#if CC_64BITS std::sort(std::begin(nodes), std::end(nodes), [](_T* n1, _T* n2) { return (n1->_localZOrder$Arrival < n2->_localZOrder$Arrival); }); #else std::sort(std::begin(nodes), std::end(nodes), [](_T* n1, _T* n2) { return (n1->_localZOrder == n2->_localZOrder && n1->_orderOfArrival < n2->_orderOfArrival) || n1->_localZOrder < n2->_localZOrder; }); #endif 

which could be simple remove.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for performance, can refer to #16126 for detail information.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the luac performed on the 64-bit and 32-bit luajit is different.

#else
#define CC_64BITS 0
Expand Down