From 660b40e31041d7cf0b5bc227bc05281419324ee4 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Thu, 8 Oct 2020 06:02:06 +0300 Subject: Helper for checking a successful status code --- src/gmutil.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gmutil.h') diff --git a/src/gmutil.h b/src/gmutil.h index 2c017af4..88572f22 100644 --- a/src/gmutil.h +++ b/src/gmutil.h @@ -74,6 +74,9 @@ iLocalDef enum iGmStatusCode category_GmStatusCode(enum iGmStatusCode code) { if (code < 10) return code; return code / 10; } +iLocalDef iBool isSuccess_GmStatusCode(enum iGmStatusCode code) { + return category_GmStatusCode(code) == categorySuccess_GmStatusCode; +} struct Impl_GmError { iChar icon; -- cgit v1.2.3