From fab2ef534cf153227b6db72b908dac7271f4062b Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Thu, 14 Nov 2013 19:10:10 -0800 Subject: [PATCH] Using language compliant header guards. --- 3rdparty/edtaa3/edtaa3func.h | 6 +++--- examples/common/aviwriter.h | 6 +++--- examples/common/cube_atlas.h | 6 +++--- examples/common/entry/cmd.h | 6 +++--- examples/common/entry/dbg.h | 6 +++--- examples/common/entry/entry.h | 6 +++--- examples/common/entry/entry_p.h | 6 +++--- examples/common/entry/input.h | 6 +++--- examples/common/font/font_manager.h | 6 +++--- examples/common/font/text_buffer_manager.h | 6 +++--- examples/common/font/text_metrics.h | 6 +++--- examples/common/font/utf8.h | 6 +++--- examples/common/fpumath.h | 6 +++--- examples/common/imgui/imgui.h | 6 +++--- examples/common/packrect.h | 6 +++--- tools/geometryc/bounds.h | 6 +++--- tools/geometryc/math.h | 6 +++--- tools/geometryc/tokenizecmd.h | 6 +++--- 18 files changed, 54 insertions(+), 54 deletions(-) diff --git a/3rdparty/edtaa3/edtaa3func.h b/3rdparty/edtaa3/edtaa3func.h index 47822546..6052aa47 100644 --- a/3rdparty/edtaa3/edtaa3func.h +++ b/3rdparty/edtaa3/edtaa3func.h @@ -1,7 +1,7 @@ -#ifndef __EDTAA3_H__ -#define __EDTAA3_H__ +#ifndef EDTAA3_H_HEADER_GUARD +#define EDTAA3_H_HEADER_GUARD extern void computegradient(double *img, int w, int h, double *gx, double *gy); extern void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist); -#endif // __EDTAA3_H__ +#endif // EDTAA3_H_HEADER_GUARD diff --git a/examples/common/aviwriter.h b/examples/common/aviwriter.h index 678a4ad7..a4cdf8c4 100644 --- a/examples/common/aviwriter.h +++ b/examples/common/aviwriter.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __AVIWRITER_H__ -#define __AVIWRITER_H__ +#ifndef AVIWRITER_H_HEADER_GUARD +#define AVIWRITER_H_HEADER_GUARD #include @@ -226,4 +226,4 @@ struct AviWriter bool m_yflip; }; -#endif // __AVIWRITER_H__ +#endif // AVIWRITER_H_HEADER_GUARD diff --git a/examples/common/cube_atlas.h b/examples/common/cube_atlas.h index 06ddbd1b..c4857533 100644 --- a/examples/common/cube_atlas.h +++ b/examples/common/cube_atlas.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __CUBE_ATLAS_H__ -#define __CUBE_ATLAS_H__ +#ifndef CUBE_ATLAS_H_HEADER_GUARD +#define CUBE_ATLAS_H_HEADER_GUARD /// Inspired from texture-atlas from freetype-gl (http://code.google.com/p/freetype-gl/) /// by Nicolas Rougier (Nicolas.Rougier@inria.fr) @@ -166,4 +166,4 @@ private: uint16_t m_maxRegionCount; }; -#endif // __CUBE_ATLAS_H__ +#endif // CUBE_ATLAS_H_HEADER_GUARD diff --git a/examples/common/entry/cmd.h b/examples/common/entry/cmd.h index a2961021..672c0b8c 100644 --- a/examples/common/entry/cmd.h +++ b/examples/common/entry/cmd.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __CMD_H__ -#define __CMD_H__ +#ifndef CMD_H_HEADER_GUARD +#define CMD_H_HEADER_GUARD struct CmdContext; typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char const* const* _argv); @@ -12,4 +12,4 @@ typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData = NULL); void cmdExec(const char* _cmd); -#endif // __CMD_H__ +#endif // CMD_H_HEADER_GUARD diff --git a/examples/common/entry/dbg.h b/examples/common/entry/dbg.h index 5f20de84..ff4bc1b5 100644 --- a/examples/common/entry/dbg.h +++ b/examples/common/entry/dbg.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __DBG_H__ -#define __DBG_H__ +#ifndef DBG_H_HEADER_GUARD +#define DBG_H_HEADER_GUARD #include // va_list #include @@ -18,4 +18,4 @@ extern void dbgPrintfVargs(const char* _format, va_list _argList); extern void dbgPrintf(const char* _format, ...); extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...); -#endif // __DBG_H__ +#endif // DBG_H_HEADER_GUARD diff --git a/examples/common/entry/entry.h b/examples/common/entry/entry.h index bfdbbb7b..09269b4d 100644 --- a/examples/common/entry/entry.h +++ b/examples/common/entry/entry.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __ENTRY_H__ -#define __ENTRY_H__ +#ifndef ENTRY_H_HEADER_GUARD +#define ENTRY_H_HEADER_GUARD #include "dbg.h" @@ -144,4 +144,4 @@ namespace entry } // namespace entry -#endif // __ENTRY_H__ +#endif // ENTRY_H_HEADER_GUARD diff --git a/examples/common/entry/entry_p.h b/examples/common/entry/entry_p.h index c2963c74..d9945357 100644 --- a/examples/common/entry/entry_p.h +++ b/examples/common/entry/entry_p.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __ENTRY_PRIVATE_H__ -#define __ENTRY_PRIVATE_H__ +#ifndef ENTRY_PRIVATE_H_HEADER_GUARD +#define ENTRY_PRIVATE_H_HEADER_GUARD #include @@ -140,4 +140,4 @@ namespace entry } // namespace entry -#endif // __ENTRY_PRIVATE_H__ +#endif // ENTRY_PRIVATE_H_HEADER_GUARD diff --git a/examples/common/entry/input.h b/examples/common/entry/input.h index 69103126..e5775491 100644 --- a/examples/common/entry/input.h +++ b/examples/common/entry/input.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __INPUT_H__ -#define __INPUT_H__ +#ifndef INPUT_H_HEADER_GUARD +#define INPUT_H_HEADER_GUARD #include #include "entry.h" @@ -52,4 +52,4 @@ void inputGetMouse(float _mouse[2]); /// bool inputIsMouseLocked(); -#endif // __INPUT_H__ +#endif // INPUT_H_HEADER_GUARD diff --git a/examples/common/font/font_manager.h b/examples/common/font/font_manager.h index 18754668..73d47120 100644 --- a/examples/common/font/font_manager.h +++ b/examples/common/font/font_manager.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __FONT_MANAGER_H__ -#define __FONT_MANAGER_H__ +#ifndef FONT_MANAGER_H_HEADER_GUARD +#define FONT_MANAGER_H_HEADER_GUARD #include #include @@ -203,4 +203,4 @@ private: uint8_t* m_buffer; }; -#endif // __FONT_MANAGER_H__ +#endif // FONT_MANAGER_H_HEADER_GUARD diff --git a/examples/common/font/text_buffer_manager.h b/examples/common/font/text_buffer_manager.h index 3240e44c..6a9ce84b 100644 --- a/examples/common/font/text_buffer_manager.h +++ b/examples/common/font/text_buffer_manager.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __TEXT_BUFFER_MANAGER_H__ -#define __TEXT_BUFFER_MANAGER_H__ +#ifndef TEXT_BUFFER_MANAGER_H_HEADER_GUARD +#define TEXT_BUFFER_MANAGER_H_HEADER_GUARD #include "font_manager.h" @@ -94,4 +94,4 @@ private: bgfx::ProgramHandle m_distanceSubpixelProgram; }; -#endif // __TEXT_BUFFER_MANAGER_H__ +#endif // TEXT_BUFFER_MANAGER_H_HEADER_GUARD diff --git a/examples/common/font/text_metrics.h b/examples/common/font/text_metrics.h index 34f39aab..80d9a5c8 100644 --- a/examples/common/font/text_metrics.h +++ b/examples/common/font/text_metrics.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __TEXT_METRICS_H__ -#define __TEXT_METRICS_H__ +#ifndef TEXT_METRICS_H_HEADER_GUARD +#define TEXT_METRICS_H_HEADER_GUARD #include "font_manager.h" @@ -65,4 +65,4 @@ private: float m_lineHeight; }; -#endif // __TEXT_METRICS_H__ +#endif // TEXT_METRICS_H_HEADER_GUARD diff --git a/examples/common/font/utf8.h b/examples/common/font/utf8.h index 04d0aa99..1103fe52 100644 --- a/examples/common/font/utf8.h +++ b/examples/common/font/utf8.h @@ -1,8 +1,8 @@ // Copyright (c) 2008-2009 Bjoern Hoehrmann // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details. -#ifndef __UTF8_H__ -#define __UTF8_H__ +#ifndef UTF8_H_HEADER_GUARD +#define UTF8_H_HEADER_GUARD #include @@ -11,4 +11,4 @@ uint32_t utf8_decode(uint32_t* _state, uint32_t* _codep, uint8_t _ch); -#endif // __UTF8_H_ +#endif // UTF8_H_HEADER_GUARD diff --git a/examples/common/fpumath.h b/examples/common/fpumath.h index b83543a8..723acab6 100644 --- a/examples/common/fpumath.h +++ b/examples/common/fpumath.h @@ -5,8 +5,8 @@ // FPU math lib -#ifndef __FPU_MATH_H__ -#define __FPU_MATH_H__ +#ifndef FPU_MATH_H_HEADER_GUARD +#define FPU_MATH_H_HEADER_GUARD #define _USE_MATH_DEFINES #include @@ -517,4 +517,4 @@ inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3] _result[3] = -vec3Dot(normal, _va); } -#endif // __FPU_MATH_H__ +#endif // FPU_MATH_H_HEADER_GUARD diff --git a/examples/common/imgui/imgui.h b/examples/common/imgui/imgui.h index 4a5e0db0..2451cca9 100644 --- a/examples/common/imgui/imgui.h +++ b/examples/common/imgui/imgui.h @@ -23,8 +23,8 @@ // // Source altered and distributed from https://github.com/AdrienHerubel/imgui -#ifndef __IMGUI_H__ -#define __IMGUI_H__ +#ifndef IMGUI_H_HEADER_GUARD +#define IMGUI_H_HEADER_GUARD #define IMGUI_MBUT_LEFT 0x01 #define IMGUI_MBUT_RIGHT 0x02 @@ -76,4 +76,4 @@ void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_ void imguiDrawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb); void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb); -#endif // __IMGUI_H__ +#endif // IMGUI_H_HEADER_GUARD diff --git a/examples/common/packrect.h b/examples/common/packrect.h index b3248409..509edc4d 100644 --- a/examples/common/packrect.h +++ b/examples/common/packrect.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __RECTPACK_H__ -#define __RECTPACK_H__ +#ifndef RECTPACK_H_HEADER_GUARD +#define RECTPACK_H_HEADER_GUARD #include @@ -174,4 +174,4 @@ private: uint8_t m_mru[6]; }; -#endif // __RECTPACK_H__ +#endif // RECTPACK_H_HEADER_GUARD diff --git a/tools/geometryc/bounds.h b/tools/geometryc/bounds.h index bee82480..3b8472c5 100644 --- a/tools/geometryc/bounds.h +++ b/tools/geometryc/bounds.h @@ -3,8 +3,8 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __BOUNDS_H__ -#define __BOUNDS_H__ +#ifndef BOUNDS_H_HEADER_GUARD +#define BOUNDS_H_HEADER_GUARD struct Aabb { @@ -44,4 +44,4 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num /// Calculate minimum bounding sphere. void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step = 0.01f); -#endif // __BOUNDS_H__ +#endif // BOUNDS_H_HEADER_GUARD diff --git a/tools/geometryc/math.h b/tools/geometryc/math.h index fdcd45b8..3f139db4 100644 --- a/tools/geometryc/math.h +++ b/tools/geometryc/math.h @@ -5,8 +5,8 @@ // FPU math lib -#ifndef __FPU_MATH_H__ -#define __FPU_MATH_H__ +#ifndef FPU_MATH_H_HEADER_GUARD +#define FPU_MATH_H_HEADER_GUARD #define _USE_MATH_DEFINES #include @@ -346,4 +346,4 @@ inline void mtxInverse(float* __restrict _result, const float* __restrict _a) _result[15] = +(xx*(yy*zz - zy*yz) - xy*(yx*zz - zx*yz) + xz*(yx*zy - zx*yy) ) * invDet; } -#endif // __FPU_MATH_H__ +#endif // FPU_MATH_H_HEADER_GUARD diff --git a/tools/geometryc/tokenizecmd.h b/tools/geometryc/tokenizecmd.h index 4155ae1e..8aa5d23b 100644 --- a/tools/geometryc/tokenizecmd.h +++ b/tools/geometryc/tokenizecmd.h @@ -3,9 +3,9 @@ * License: http://www.opensource.org/licenses/BSD-2-Clause */ -#ifndef __TOKENIZE_CMD_H__ -#define __TOKENIZE_CMD_H__ +#ifndef TOKENIZE_CMD_H_HEADER_GUARD +#define TOKENIZE_CMD_H_HEADER_GUARD const char* tokenizeCommandLine(const char* _commandLine, char* _buffer, uint32_t& _bufferSize, int& _argc, char* _argv[], int _maxArgvs, char _term = '\0'); -#endif // __TOKENIZE_CMD_H__ +#endif // TOKENIZE_CMD_H_HEADER_GUARD