From c1ac8cd71c514c9a6dbd6681e1ca79f81e8d95b9 Mon Sep 17 00:00:00 2001 From: Justin Scofield Date: Thu, 4 Aug 2022 19:03:46 +0000 Subject: [PATCH] Add CHECK_STATUS macro --- src/app/core/constants.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/core/constants.h b/src/app/core/constants.h index 4986be5a..55a0e640 100644 --- a/src/app/core/constants.h +++ b/src/app/core/constants.h @@ -25,6 +25,11 @@ #define MENU_ITEM(w) if (ImGui::MenuItem(w)) #define MENU_ITEM2(w, v) if (ImGui::MenuItem(w, v)) +#define CHECK_STATUS(w) \ + if (!w.ok()) { \ + return w; \ + } + using ushort = unsigned short; using uint = unsigned int; using uchar = unsigned char;