add PRINT_IF_ERROR macro

This commit is contained in:
Justin Scofield
2022-08-27 22:06:41 -05:00
parent 8b32b4bb97
commit b2030be95f

View File

@@ -25,6 +25,14 @@
#define MENU_ITEM(w) if (ImGui::MenuItem(w))
#define MENU_ITEM2(w, v) if (ImGui::MenuItem(w, v))
#define PRINT_IF_ERROR(expression) \
{ \
auto error = expression; \
if (!error.ok()) { \
std::cout << error.ToString() << std::endl; \
} \
}
#define RETURN_IF_ERROR(expression) \
{ \
auto error = expression; \