Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
14 lines
275 B
C
14 lines
275 B
C
#pragma once
|
|
|
|
static bool success_(OSStatus stat, const char *func, const char *call)
|
|
{
|
|
if (stat != noErr) {
|
|
blog(LOG_WARNING, "%s: %s failed: %d", func, call, (int)stat);
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
#define success(stat, call) success_(stat, __FUNCTION__, call)
|