Assert: Uppercase assertion macros

Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
This commit is contained in:
Lioncash
2018-03-14 20:34:35 -04:00
parent 19d97f3fd9
commit 50a476c371
135 changed files with 719 additions and 741 deletions

View File

@ -92,7 +92,7 @@ bool DiscContent::Read(u64* offset, u64* length, u8** buffer) const
if (m_size == 0)
return true;
_dbg_assert_(DISCIO, *offset >= m_offset);
DEBUG_ASSERT(DISCIO, *offset >= m_offset);
const u64 offset_in_content = *offset - m_offset;
if (offset_in_content < m_size)
@ -160,7 +160,7 @@ bool DiscContentContainer::Read(u64 offset, u64 length, u8* buffer) const
return false;
++it;
_dbg_assert_(DISCIO, it == m_contents.end() || it->GetOffset() >= offset);
DEBUG_ASSERT(DISCIO, it == m_contents.end() || it->GetOffset() >= offset);
}
// Zero fill if we went beyond the last DiscContent
@ -688,7 +688,7 @@ void DirectoryBlobPartition::BuildFST(u64 fst_address)
name_table_offset);
// overflow check, compare the aligned name offset with the aligned name table size
_assert_(Common::AlignUp(name_offset, 1ull << m_address_shift) == name_table_size);
ASSERT(Common::AlignUp(name_offset, 1ull << m_address_shift) == name_table_size);
// write FST size and location
Write32((u32)(fst_address >> m_address_shift), 0x0424, &m_disc_header);

View File

@ -30,7 +30,7 @@ namespace DiscIO
{
VolumeGC::VolumeGC(std::unique_ptr<BlobReader> reader) : m_pReader(std::move(reader))
{
_assert_(m_pReader);
ASSERT(m_pReader);
m_file_system = [this]() -> std::unique_ptr<FileSystem> {
auto file_system = std::make_unique<FileSystemGCWii>(this, PARTITION_NONE);

View File

@ -28,7 +28,7 @@ namespace DiscIO
{
VolumeWAD::VolumeWAD(std::unique_ptr<BlobReader> reader) : m_reader(std::move(reader))
{
_assert_(m_reader);
ASSERT(m_reader);
// Source: http://wiibrew.org/wiki/WAD_files
m_hdr_size = m_reader->ReadSwapped<u32>(0x00).value_or(0);

View File

@ -39,7 +39,7 @@ VolumeWii::VolumeWii(std::unique_ptr<BlobReader> reader)
: m_pReader(std::move(reader)), m_game_partition(PARTITION_NONE),
m_last_decrypted_block(UINT64_MAX)
{
_assert_(m_pReader);
ASSERT(m_pReader);
if (m_pReader->ReadSwapped<u32>(0x60) != u32(0))
{

View File

@ -58,7 +58,7 @@ void WbfsFileReader::OpenAdditionalFiles(const std::string& path)
if (path.length() < 4)
return;
_assert_(m_files.size() > 0); // The code below gives .wbf0 for index 0, but it should be .wbfs
ASSERT(m_files.size() > 0); // The code below gives .wbf0 for index 0, but it should be .wbfs
while (true)
{

View File

@ -74,7 +74,7 @@ bool WiiWAD::ParseWAD()
}
if (MAX_LOGLEVEL >= LogTypes::LOG_LEVELS::LDEBUG)
_dbg_assert_msg_(BOOT, *reserved == 0x00, "WiiWAD: Reserved must be 0x00");
DEBUG_ASSERT_MSG(BOOT, *reserved == 0x00, "WiiWAD: Reserved must be 0x00");
u32 offset = 0x40;
m_certificate_chain = CreateWADEntry(*m_reader, *certificate_chain_size, offset);