diff options
author | David Robillard <d@drobilla.net> | 2020-10-21 12:23:24 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-21 15:43:29 +0200 |
commit | feb6c4f7952eafbc8c2203ef0c657ea3580ee441 (patch) | |
tree | d67ed34eb9955720fd63b961f9b07ce00f5321a9 | |
parent | 063ddc8db2831e1f79d7569c8fc80dd3d54f5cda (diff) | |
download | pugl-feb6c4f7952eafbc8c2203ef0c657ea3580ee441.tar.gz pugl-feb6c4f7952eafbc8c2203ef0c657ea3580ee441.tar.bz2 pugl-feb6c4f7952eafbc8c2203ef0c657ea3580ee441.zip |
Add missing include guards
-rw-r--r-- | examples/cube_view.h | 5 | ||||
-rw-r--r-- | examples/demo_utils.h | 6 | ||||
-rw-r--r-- | examples/rects.h | 5 | ||||
-rw-r--r-- | examples/shader_utils.h | 5 | ||||
-rw-r--r-- | include/pugl/detail/mac.h | 5 | ||||
-rw-r--r-- | include/pugl/detail/win.h | 5 | ||||
-rw-r--r-- | include/pugl/detail/x11.h | 5 | ||||
-rw-r--r-- | include/pugl/gl.h | 5 | ||||
-rw-r--r-- | include/pugl/glu.h | 5 | ||||
-rw-r--r-- | test/test_utils.h | 5 |
10 files changed, 48 insertions, 3 deletions
diff --git a/examples/cube_view.h b/examples/cube_view.h index cf930a4..87bf3b5 100644 --- a/examples/cube_view.h +++ b/examples/cube_view.h @@ -14,6 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef EXAMPLES_CUBE_VIEW_H +#define EXAMPLES_CUBE_VIEW_H + #define GL_SILENCE_DEPRECATION 1 #include "demo_utils.h" @@ -129,3 +132,5 @@ displayCube(PuglView* const view, glDrawArrays(GL_LINES, 0, 8); glDisableClientState(GL_VERTEX_ARRAY); } + +#endif // EXAMPLES_CUBE_VIEW_H diff --git a/examples/demo_utils.h b/examples/demo_utils.h index 925753a..9057a32 100644 --- a/examples/demo_utils.h +++ b/examples/demo_utils.h @@ -14,8 +14,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#ifndef PUGL_DEMO_UTILS_H -#define PUGL_DEMO_UTILS_H +#ifndef EXAMPLES_DEMO_UTILS_H +#define EXAMPLES_DEMO_UTILS_H #include "pugl/pugl.h" @@ -123,4 +123,4 @@ puglPrintFps(const PuglWorld* world, } } -#endif // PUGL_DEMO_UTILS_H +#endif // EXAMPLES_DEMO_UTILS_H diff --git a/examples/rects.h b/examples/rects.h index f760226..f53698c 100644 --- a/examples/rects.h +++ b/examples/rects.h @@ -22,6 +22,9 @@ many 2D rectangles. */ +#ifndef EXAMPLES_RECTS_H +#define EXAMPLES_RECTS_H + #include <math.h> #include <stddef.h> @@ -80,3 +83,5 @@ moveRect(Rect* const rect, (cosf((float)time * rect->size[1] / 64.0f + normal) + 1.0f) / 2.0f; } + +#endif // EXAMPLES_RECTS_H diff --git a/examples/shader_utils.h b/examples/shader_utils.h index 10a7ace..217ba47 100644 --- a/examples/shader_utils.h +++ b/examples/shader_utils.h @@ -14,6 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef EXAMPLES_SHADER_UTILS_H +#define EXAMPLES_SHADER_UTILS_H + #include "glad/glad.h" #include <stdio.h> @@ -100,3 +103,5 @@ compileProgram(const char* headerSource, return program; } + +#endif // EXAMPLES_SHADER_UTILS_H diff --git a/include/pugl/detail/mac.h b/include/pugl/detail/mac.h index 7b64cfe..55f24ca 100644 --- a/include/pugl/detail/mac.h +++ b/include/pugl/detail/mac.h @@ -20,6 +20,9 @@ @brief Shared definitions for MacOS implementation. */ +#ifndef PUGL_DETAIL_MAC_H +#define PUGL_DETAIL_MAC_H + #include "pugl/pugl.h" #import <Cocoa/Cocoa.h> @@ -53,3 +56,5 @@ struct PuglInternalsImpl { uint32_t mods; bool mouseTracked; }; + +#endif // PUGL_DETAIL_MAC_H diff --git a/include/pugl/detail/win.h b/include/pugl/detail/win.h index b0d92e0..0ead1fa 100644 --- a/include/pugl/detail/win.h +++ b/include/pugl/detail/win.h @@ -19,6 +19,9 @@ @brief Shared definitions for Windows implementation. */ +#ifndef PUGL_DETAIL_WIN_H +#define PUGL_DETAIL_WIN_H + #include "pugl/detail/implementation.h" #include <windows.h> @@ -145,3 +148,5 @@ puglWinStubEnter(PuglView* view, const PuglEventExpose* expose); PuglStatus puglWinStubLeave(PuglView* view, const PuglEventExpose* expose); + +#endif // PUGL_DETAIL_WIN_H diff --git a/include/pugl/detail/x11.h b/include/pugl/detail/x11.h index b5ca75c..9788191 100644 --- a/include/pugl/detail/x11.h +++ b/include/pugl/detail/x11.h @@ -19,6 +19,9 @@ @brief Shared definitions for X11 implementation. */ +#ifndef PUGL_DETAIL_X11_H +#define PUGL_DETAIL_X11_H + #include "pugl/detail/types.h" #include "pugl/pugl.h" @@ -74,3 +77,5 @@ struct PuglInternalsImpl { }; PuglStatus puglX11StubConfigure(PuglView* view); + +#endif // PUGL_DETAIL_X11_H diff --git a/include/pugl/gl.h b/include/pugl/gl.h index 9f7a741..17352e1 100644 --- a/include/pugl/gl.h +++ b/include/pugl/gl.h @@ -22,6 +22,9 @@ pure portable programs. */ +#ifndef PUGL_GL_H +#define PUGL_GL_H + // IWYU pragma: begin_exports #ifdef __APPLE__ @@ -34,3 +37,5 @@ #endif // IWYU pragma: end_exports + +#endif // PUGL_GL_H diff --git a/include/pugl/glu.h b/include/pugl/glu.h index 423a917..b67b7a0 100644 --- a/include/pugl/glu.h +++ b/include/pugl/glu.h @@ -22,6 +22,9 @@ pure portable programs. */ +#ifndef PUGL_GLU_H +#define PUGL_GLU_H + // IWYU pragma: begin_exports #ifdef __APPLE__ @@ -34,3 +37,5 @@ #endif // IWYU pragma: end_exports + +#endif // PUGL_GLU_H diff --git a/test/test_utils.h b/test/test_utils.h index 6148d84..42b9ef9 100644 --- a/test/test_utils.h +++ b/test/test_utils.h @@ -14,6 +14,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifndef TEST_TEST_UTILS_H +#define TEST_TEST_UTILS_H + #define __STDC_FORMAT_MACROS 1 #include "pugl/pugl.h" @@ -345,3 +348,5 @@ puglParseTestOptions(int* pargc, char*** pargv) return opts; } + +#endif // TEST_TEST_UTILS_H |