Use do { ... } while (0) for the *_LOG macros

Without this patch, such code would not compile:

if (cond)
    WARN_LOG(FOO, "msg");
else
    WARN_LOG(FOO, "msg2");
This commit is contained in:
Pierre Bourdon committed 2012-08-20 13:12:49 +02:00
1 parent 603bd9982d
commit 54fc4029dd
4 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -675,7 +675,7 @@ void ExecuteCommand(UDICR& _DICR)
_dbg_assert_(DVDINTERFACE, m_DILENGTH.Length == 0x20);
if (!DVDRead(m_DICMDBUF[1].Hex, m_DIMAR.Address, m_DILENGTH.Length))
PanicAlertT("Cant read from DVD_Plugin - DVD-Interface: Fatal Error");
WARN_LOG(DVDINTERFACE, "Read DiscID %08x", Memory::Read_U32(m_DIMAR.Address))
WARN_LOG(DVDINTERFACE, "Read DiscID %08x", Memory::Read_U32(m_DIMAR.Address));
break;
default: