diff options
| author | Max Horn | 2010-07-20 07:10:25 +0000 |
|---|---|---|
| committer | Max Horn | 2010-07-20 07:10:25 +0000 |
| commit | 5b626533cdbc2b9a8cb0b478d8e93ece852de1b9 (patch) | |
| tree | 3bd0cbca8487e521683fc6f34749f03cdd265b6a /backends/graphics/opengl/glerrorcheck.h | |
| parent | 302400a701187eba6d0dee2daa253da87b29d83f (diff) | |
| download | scummvm-rg350-5b626533cdbc2b9a8cb0b478d8e93ece852de1b9.tar.gz scummvm-rg350-5b626533cdbc2b9a8cb0b478d8e93ece852de1b9.tar.bz2 scummvm-rg350-5b626533cdbc2b9a8cb0b478d8e93ece852de1b9.zip | |
Change CHECK_GL_ERROR to not take a 'call statement' as parameter
Passing a 'call statement' to CHECK_GL_ERROR has various issues.
For once, it confuses code parsers in many editors and other
tools that work with C++ source directly.
Moreover, this can lead to subtle bugs if a mistake is
made with the definition of CHECK_GL_ERROR.
It also causes incorrect warnings if CHECK_GL_ERROR is
used with an "empty" call statement.
svn-id: r51050
Diffstat (limited to 'backends/graphics/opengl/glerrorcheck.h')
| -rw-r--r-- | backends/graphics/opengl/glerrorcheck.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/graphics/opengl/glerrorcheck.h b/backends/graphics/opengl/glerrorcheck.h index c5cbf5726b..a94699ce1d 100644 --- a/backends/graphics/opengl/glerrorcheck.h +++ b/backends/graphics/opengl/glerrorcheck.h @@ -25,13 +25,13 @@ #if !defined(DEBUG) -// If not in debug, just do the GL call -#define CHECK_GL_ERROR(call) (call) +// If not in debug, do nothing +#define CHECK_GL_ERROR() do {} while (false) #else // If in debug, check for an error after a GL call -#define CHECK_GL_ERROR(call) ((call), checkGlError(__FILE__, __LINE__)) +#define CHECK_GL_ERROR() checkGlError(__FILE__, __LINE__) void checkGlError(const char *file, int line); |
