From 57f4e225d10c73bbefa276f01d37b13c4138e245 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 30 Apr 2023 13:36:18 +0100 Subject: Rename strings.h to something that won't conflict with a system header --- lib/embed-glsl.cpp.m4 | 2 +- lib/strings.h | 13 ------------- lib/strlen.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 lib/strings.h create mode 100644 lib/strlen.h diff --git a/lib/embed-glsl.cpp.m4 b/lib/embed-glsl.cpp.m4 index 3503f75..8407132 100644 --- a/lib/embed-glsl.cpp.m4 +++ b/lib/embed-glsl.cpp.m4 @@ -3,7 +3,7 @@ changecom()dnl #include "substr(TYPE,1)-NAME.h" #include #include "gfx/gl/shader.h" -#include "lib/strings.h" +#include "lib/strlen.h" constexpr const GLchar * src { R"GLSL-EMBED(dnl include(SOURCE))GLSL-EMBED" }; diff --git a/lib/strings.h b/lib/strings.h deleted file mode 100644 index 9dca9ac..0000000 --- a/lib/strings.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -#include - -constexpr auto -constexpr_strlen(const GLchar * const s) -{ - std::size_t ch {}; - while (s[ch]) { - ch++; - } - return ch; -} diff --git a/lib/strlen.h b/lib/strlen.h new file mode 100644 index 0000000..0053cce --- /dev/null +++ b/lib/strlen.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +constexpr auto +constexpr_strlen(const GLchar * const s) +{ + std::size_t ch {}; + while (s[ch]) { + ch++; + } + return ch; +} -- cgit v1.2.3