From 48708fe72976c08393942560617a7c275f282412 Mon Sep 17 00:00:00 2001 From: ikits Date: Wed, 1 Oct 2003 03:41:11 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: https://glew.svn.sourceforge.net/svnroot/glew/trunk/glew@146 783a27ee-832a-0410-bc00-9f386506c6dd --- auto/src/glew_post.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/auto/src/glew_post.c b/auto/src/glew_post.c index b9716a8..0d59c04 100644 --- a/auto/src/glew_post.c +++ b/auto/src/glew_post.c @@ -15,8 +15,7 @@ const GLubyte* glewGetErrorString (GLenum error) "GLX 1.2 and up are not supported", "unknown error" }; - if (error > 4) error = 4; - return _glewErrorString[error]; + return _glewErrorString[error > 4 ? 4 : error]; } const GLubyte* glewGetString (GLenum name) @@ -26,8 +25,7 @@ const GLubyte* glewGetString (GLenum name) NULL, "GLEW_VERSION_STRING" }; - if (name > 1) name = 0; - return _glewString[name]; + return _glewString[name > 1 ? 0 : name]; } /* ------------------------------------------------------------------------ */