From 7827b06edf6a0629eb659540595c347965abfb88 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 27 Nov 2021 00:36:19 +0000 Subject: Fix up lots of static analyzer warnings --- gfx/gl/shader-source.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gfx/gl') diff --git a/gfx/gl/shader-source.h b/gfx/gl/shader-source.h index 9403e80..f22cc3b 100644 --- a/gfx/gl/shader-source.h +++ b/gfx/gl/shader-source.h @@ -17,9 +17,11 @@ struct GLsource { constexpr auto constexpr_strlen(const GLchar * const s) { - auto e {s}; - while (*++e) { } - return e - s; + std::size_t ch {}; + while (s[ch]) { + ch++; + } + return ch; } #endif -- cgit v1.2.3