Make HR* macros statements.

Currently HR* macros expand to block expressions which neither need nor
require a closing semicolon. Since at the use site these macros look
like statements which should use a closing semicolon, change the macro
definition to be a statement. This should also fix many warnings around
unneeded semicolons.

Change-Id: I288fdfefa083c6e04a1e7b0a055c8972b7e8b367
Reviewed-on: https://skia-review.googlesource.com/c/189301
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This commit is contained in:
Ben Wagner 2019-02-04 13:50:02 -05:00 committed by Skia Commit-Bot
parent 9da87e0e98
commit 0b46a39820

View File

@ -22,13 +22,13 @@ void SkTraceHR(const char* file, unsigned long line,
#define SK_TRACEHR(_hr, _msg) sk_ignore_unused_variable(_hr)
#endif
#define HR_GENERAL(_ex, _msg, _ret) {\
#define HR_GENERAL(_ex, _msg, _ret) do {\
HRESULT _hr = _ex;\
if (FAILED(_hr)) {\
SK_TRACEHR(_hr, _msg);\
return _ret;\
}\
}
} while(false)
//@{
/**