feat(Core/Common): add support fmt style for ASSERT and ABORT (#10355)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp
This commit is contained in:
parent
2fec54c442
commit
e8f34b2309
14 changed files with 411 additions and 152 deletions
|
|
@ -110,8 +110,8 @@ uint32 ByteBuffer::ReadPackedTime()
|
|||
|
||||
void ByteBuffer::append(uint8 const* src, size_t cnt)
|
||||
{
|
||||
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
|
||||
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", _wpos, size());
|
||||
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: {} size: {})", _wpos, size());
|
||||
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: {} size: {})", _wpos, size());
|
||||
ASSERT(size() < 10000000);
|
||||
|
||||
size_t const newSize = _wpos + cnt;
|
||||
|
|
@ -143,9 +143,9 @@ void ByteBuffer::AppendPackedTime(time_t time)
|
|||
|
||||
void ByteBuffer::put(size_t pos, uint8 const* src, size_t cnt)
|
||||
{
|
||||
ASSERT(pos + cnt <= size(), "Attempted to put value with size: " SZFMTD " in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", cnt, pos, size());
|
||||
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", pos, size());
|
||||
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: " SZFMTD " size: " SZFMTD ")", pos, size());
|
||||
ASSERT(pos + cnt <= size(), "Attempted to put value with size: {} in ByteBuffer (pos: {} size: {})", cnt, pos, size());
|
||||
ASSERT(src, "Attempted to put a NULL-pointer in ByteBuffer (pos: {} size: {})", pos, size());
|
||||
ASSERT(cnt, "Attempted to put a zero-sized value in ByteBuffer (pos: {} size: {})", pos, size());
|
||||
|
||||
std::memcpy(&_storage[pos], src, cnt);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue