mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
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:
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user