From a58ecadd4b64ed1d1d423a7334e54c7042178be1 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 a736d560..54eba4c7 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;