Mesa (master): mesa: Use unreachable instead of assert in check_valid_to_render

Ian Romanick idr at kemper.freedesktop.org
Tue Dec 2 22:56:44 UTC 2014


Module: Mesa
Branch: master
Commit: 331b0120d16445dd8d5b8d049946ae7845fb714b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=331b0120d16445dd8d5b8d049946ae7845fb714b

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Nov 11 10:20:49 2014 +0000

mesa: Use unreachable instead of assert in check_valid_to_render

This is generally the prefered style these days.

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/main/api_validate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 181a61d..304d576 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -113,7 +113,7 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
       break;
 
    default:
-      assert(!"Invalid API value in check_valid_to_render()");
+      unreachable("Invalid API value in check_valid_to_render()");
    }
 
    return GL_TRUE;




More information about the mesa-commit mailing list