From 5f85a1dcf03598466b14ce0f2325a8cd881b9033 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 2 Jan 2014 10:42:00 -0800 Subject: Move some error macros to alError.h --- OpenAL32/Include/alError.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenAL32/Include/alError.h') diff --git a/OpenAL32/Include/alError.h b/OpenAL32/Include/alError.h index 0ade342d..ab91d27b 100644 --- a/OpenAL32/Include/alError.h +++ b/OpenAL32/Include/alError.h @@ -11,6 +11,21 @@ extern ALboolean TrapALError; ALvoid alSetError(ALCcontext *Context, ALenum errorCode); +#define SET_ERROR_AND_RETURN(ctx, err) do { \ + alSetError((ctx), (err)); \ + return; \ +} while(0) + +#define SET_ERROR_AND_RETURN_VALUE(ctx, err, val) do { \ + alSetError((ctx), (err)); \ + return (val); \ +} while(0) + +#define SET_ERROR_AND_GOTO(ctx, err, lbl) do { \ + alSetError((ctx), (err)); \ + goto lbl; \ +} while(0) + #ifdef __cplusplus } #endif -- cgit v1.2.3