Skip to content

Commit 92e3e36

Browse files
committed
Use CONSTEXPR
1 parent ffd2159 commit 92e3e36

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GeneralsMD/Code/GameEngine/Include/Common/SparseMatchFinder.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,12 @@ class SparseMatchFinder
204204
//-------------------------------------------------------------------------------------------------
205205
SparseMatchFinder& operator=(const SparseMatchFinder& other)
206206
{
207-
if ((FLAGS & SparseMatchFinderFlags_NoCopy) == 0 && this != &other)
207+
if CONSTEXPR ((FLAGS & SparseMatchFinderFlags_NoCopy) == 0)
208208
{
209-
m_bestMatches = other.m_bestMatches;
209+
if (this != &other)
210+
{
211+
m_bestMatches = other.m_bestMatches;
212+
}
210213
}
211214
return *this;
212215
}

0 commit comments

Comments
 (0)