From c8af09f3b4faff0a4e873a6a561a2823e1f22d40 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 8 Sep 2014 13:28:52 +0000 Subject: [PATCH] build: use #pragma once instead of header guards because 1) fuck the dinosaurs, and 2) fuck the Visual Studio compiler that crashes when confused. --- neercs/neercs.h | 5 +---- neercs/old/neercs.h | 5 ++--- neercs/term/pty.h | 5 +---- neercs/term/term.h | 5 +---- neercs/video/render.h | 4 +--- neercs/video/text-render.h | 5 +---- 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/neercs/neercs.h b/neercs/neercs.h index dd6e115..fb4bc1b 100644 --- a/neercs/neercs.h +++ b/neercs/neercs.h @@ -4,8 +4,7 @@ // Copyright: (c) 2012 Sam Hocevar // -#if !defined __NEERCS_H__ -#define __NEERCS_H__ +#pragma once #include @@ -36,5 +35,3 @@ private: bool m_ready; }; -#endif // __NEERCS_H__ - diff --git a/neercs/old/neercs.h b/neercs/old/neercs.h index 5d7e37f..acdccde 100644 --- a/neercs/old/neercs.h +++ b/neercs/old/neercs.h @@ -11,8 +11,7 @@ * http://www.wtfpl.net/ for more details. */ -#ifndef _NEERCS_H_ -#define _NEERCS_H_ +#pragma once #include #include @@ -427,4 +426,4 @@ static inline void debug(const char *format, ...) #else # define debug(format, ...) do {} while(0) #endif -#endif /* _NEERCS_H_ */ + diff --git a/neercs/term/pty.h b/neercs/term/pty.h index 02fc78b..176f952 100644 --- a/neercs/term/pty.h +++ b/neercs/term/pty.h @@ -2,8 +2,7 @@ // Neercs // -#if !defined __TERM_PTY_H__ -#define __TERM_PTY_H__ +#pragma once class Pty { @@ -30,5 +29,3 @@ private: ivec2 m_size; }; -#endif // __TERM_PTY_H__ - diff --git a/neercs/term/term.h b/neercs/term/term.h index 566dd14..4ff86f4 100644 --- a/neercs/term/term.h +++ b/neercs/term/term.h @@ -2,8 +2,7 @@ // Neercs // -#if !defined __TERM_TERM_H__ -#define __TERM_TERM_H__ +#pragma once #include "term/pty.h" @@ -129,5 +128,3 @@ private: bool m_debug; }; -#endif // __TERM_TERM_H__ - diff --git a/neercs/video/render.h b/neercs/video/render.h index 4e31234..f46d6a2 100644 --- a/neercs/video/render.h +++ b/neercs/video/render.h @@ -2,8 +2,7 @@ // Neercs // -#if !defined __VIDEO_RENDER_H__ -#define __VIDEO_RENDER_H__ +#pragma once class Render : public WorldEntity { @@ -55,4 +54,3 @@ private: m_flags; }; -#endif // __VIDEO_RENDER_H__ diff --git a/neercs/video/text-render.h b/neercs/video/text-render.h index ee37433..c6426a3 100644 --- a/neercs/video/text-render.h +++ b/neercs/video/text-render.h @@ -2,8 +2,7 @@ // Neercs // -#if !defined __TEXT_RENDER_H__ -#define __TEXT_RENDER_H__ +#pragma once class TextRender { @@ -31,5 +30,3 @@ private: Framebuffer *m_fbo; }; -#endif // __TEXT_RENDER_H__ -