1
0

Warnings improvements

* Turn off global-constructors warning. These are needed to implement cRoot signal handler functionality
* Add Clang flags based on version lookup instead of a compile test. The CMake config process is single threaded and slow enough already
* Reduced GetStackValue verbosity
+ Clarify EnchantmentLevel, StayCount, AlwaysTicked, ViewDistance signedness
+ Give SettingsRepositoryInterface a move constructor to simplify main.cpp code
- Remove do {} while (false) construction in redstone handler
This commit is contained in:
Tiger Wang
2020-10-05 13:09:42 +01:00
parent 83e18f6d31
commit 090d8305e4
29 changed files with 225 additions and 211 deletions

View File

@@ -479,8 +479,15 @@ bool cChunk::HasBlockEntityAt(Vector3i a_BlockPos)
void cChunk::Stay(bool a_Stay)
{
m_StayCount += (a_Stay ? 1 : -1);
ASSERT(m_StayCount >= 0);
if (a_Stay)
{
m_StayCount++;
}
else
{
ASSERT(m_StayCount != 0);
m_StayCount--;
}
}