summaryrefslogtreecommitdiff
path: root/gfx/gl
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-11-27 00:36:19 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-27 00:36:25 +0000
commit7827b06edf6a0629eb659540595c347965abfb88 (patch)
tree3b52612ae8f591f23e2b179fe817f4d4c948a7ce /gfx/gl
parentEnable all Jason Turner recommended warnings (diff)
downloadilt-7827b06edf6a0629eb659540595c347965abfb88.tar.bz2
ilt-7827b06edf6a0629eb659540595c347965abfb88.tar.xz
ilt-7827b06edf6a0629eb659540595c347965abfb88.zip
Fix up lots of static analyzer warnings
Diffstat (limited to 'gfx/gl')
-rw-r--r--gfx/gl/shader-source.h8
1 files changed, 5 insertions, 3 deletions
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