mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 03:09:13 +00:00
Replace COMPILER_ASSERT with C++0B static_assert
This commit is contained in:
@ -583,7 +583,7 @@ void CSocket::OnWriteReady () {
|
||||
&m_sendQueue[result],
|
||||
m_sendQueue.Bytes() - result
|
||||
);
|
||||
COMPILER_ASSERT(sizeof(m_sendQueue[0]) == sizeof(uint8_t));
|
||||
static_assert(sizeof(m_sendQueue[0]) == sizeof(uint8_t), "SendQueue array members are an unexpected size");
|
||||
m_sendQueue.SetCount(m_sendQueue.Count() - result);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ void AsyncSleep (unsigned sleepMs) {
|
||||
|
||||
//============================================================================
|
||||
long AsyncPerfGetCounter (unsigned id) {
|
||||
COMPILER_ASSERT(arrsize(s_perf) == kNumAsyncPerfCounters);
|
||||
static_assert(arrsize(s_perf) == kNumAsyncPerfCounters, "Max async counters and array size do not match.");
|
||||
ASSERT(id < kNumAsyncPerfCounters);
|
||||
return s_perf[id];
|
||||
}
|
||||
|
Reference in New Issue
Block a user