소스 검색

Using language compliant header guards.

bkaradzic 12 년 전
부모
커밋
fab2ef534c

+ 3 - 3
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 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);
 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

+ 3 - 3
examples/common/aviwriter.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <bx/readerwriter.h>
 #include <bx/readerwriter.h>
 
 
@@ -226,4 +226,4 @@ struct AviWriter
 	bool m_yflip;
 	bool m_yflip;
 };
 };
 
 
-#endif // __AVIWRITER_H__
+#endif // AVIWRITER_H_HEADER_GUARD

+ 3 - 3
examples/common/cube_atlas.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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/)
 /// Inspired from texture-atlas from freetype-gl (http://code.google.com/p/freetype-gl/)
 /// by Nicolas Rougier ([email protected])
 /// by Nicolas Rougier ([email protected])
@@ -166,4 +166,4 @@ private:
 	uint16_t m_maxRegionCount;
 	uint16_t m_maxRegionCount;
 };
 };
 
 
-#endif // __CUBE_ATLAS_H__
+#endif // CUBE_ATLAS_H_HEADER_GUARD

+ 3 - 3
examples/common/entry/cmd.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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;
 struct CmdContext;
 typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char const* const* _argv);
 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 cmdAdd(const char* _name, ConsoleFn _fn, void* _userData = NULL);
 void cmdExec(const char* _cmd);
 void cmdExec(const char* _cmd);
 
 
-#endif // __CMD_H__
+#endif // CMD_H_HEADER_GUARD

+ 3 - 3
examples/common/entry/dbg.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <stdarg.h> // va_list
 #include <stdarg.h> // va_list
 #include <stdint.h>
 #include <stdint.h>
@@ -18,4 +18,4 @@ extern void dbgPrintfVargs(const char* _format, va_list _argList);
 extern void dbgPrintf(const char* _format, ...);
 extern void dbgPrintf(const char* _format, ...);
 extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...);
 extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...);
 
 
-#endif // __DBG_H__
+#endif // DBG_H_HEADER_GUARD

+ 3 - 3
examples/common/entry/entry.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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"
 #include "dbg.h"
 
 
@@ -144,4 +144,4 @@ namespace entry
 
 
 } // namespace entry
 } // namespace entry
 
 
-#endif // __ENTRY_H__
+#endif // ENTRY_H_HEADER_GUARD

+ 3 - 3
examples/common/entry/entry_p.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <bx/spscqueue.h>
 #include <bx/spscqueue.h>
 
 
@@ -140,4 +140,4 @@ namespace entry
 
 
 } // namespace entry
 } // namespace entry
 
 
-#endif // __ENTRY_PRIVATE_H__
+#endif // ENTRY_PRIVATE_H_HEADER_GUARD

+ 3 - 3
examples/common/entry/input.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <stdint.h>
 #include <stdint.h>
 #include "entry.h"
 #include "entry.h"
@@ -52,4 +52,4 @@ void inputGetMouse(float _mouse[2]);
 ///
 ///
 bool inputIsMouseLocked();
 bool inputIsMouseLocked();
 
 
-#endif // __INPUT_H__
+#endif // INPUT_H_HEADER_GUARD

+ 3 - 3
examples/common/font/font_manager.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <bx/handlealloc.h>
 #include <bx/handlealloc.h>
 #include <bgfx.h>
 #include <bgfx.h>
@@ -203,4 +203,4 @@ private:
 	uint8_t* m_buffer;
 	uint8_t* m_buffer;
 };
 };
 
 
-#endif // __FONT_MANAGER_H__
+#endif // FONT_MANAGER_H_HEADER_GUARD

+ 3 - 3
examples/common/font/text_buffer_manager.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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"
 #include "font_manager.h"
 
 
@@ -94,4 +94,4 @@ private:
 	bgfx::ProgramHandle m_distanceSubpixelProgram;
 	bgfx::ProgramHandle m_distanceSubpixelProgram;
 };
 };
 
 
-#endif // __TEXT_BUFFER_MANAGER_H__
+#endif // TEXT_BUFFER_MANAGER_H_HEADER_GUARD

+ 3 - 3
examples/common/font/text_metrics.h

@@ -3,8 +3,8 @@
 * License: http://www.opensource.org/licenses/BSD-2-Clause
 * 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"
 #include "font_manager.h"
 
 
@@ -65,4 +65,4 @@ private:
 	float m_lineHeight;
 	float m_lineHeight;
 };
 };
 
 
-#endif // __TEXT_METRICS_H__
+#endif // TEXT_METRICS_H_HEADER_GUARD

+ 3 - 3
examples/common/font/utf8.h

@@ -1,8 +1,8 @@
 // Copyright (c) 2008-2009 Bjoern Hoehrmann <[email protected]>
 // Copyright (c) 2008-2009 Bjoern Hoehrmann <[email protected]>
 // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
 // 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 <stdint.h>
 #include <stdint.h>
 
 
@@ -11,4 +11,4 @@
 
 
 uint32_t utf8_decode(uint32_t* _state, uint32_t* _codep, uint8_t _ch);
 uint32_t utf8_decode(uint32_t* _state, uint32_t* _codep, uint8_t _ch);
 
 
-#endif // __UTF8_H_
+#endif // UTF8_H_HEADER_GUARD

+ 3 - 3
examples/common/fpumath.h

@@ -5,8 +5,8 @@
 
 
 // FPU math lib
 // 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
 #define _USE_MATH_DEFINES
 #include <math.h>
 #include <math.h>
@@ -517,4 +517,4 @@ inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3]
 	_result[3] = -vec3Dot(normal, _va);
 	_result[3] = -vec3Dot(normal, _va);
 }
 }
 
 
-#endif // __FPU_MATH_H__
+#endif // FPU_MATH_H_HEADER_GUARD

+ 3 - 3
examples/common/imgui/imgui.h

@@ -23,8 +23,8 @@
 //
 //
 // Source altered and distributed from https://github.com/AdrienHerubel/imgui
 // 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_LEFT  0x01
 #define IMGUI_MBUT_RIGHT 0x02
 #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 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);
 void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb);
 
 
-#endif // __IMGUI_H__
+#endif // IMGUI_H_HEADER_GUARD

+ 3 - 3
examples/common/packrect.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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 <bx/uint32_t.h>
 #include <bx/uint32_t.h>
 
 
@@ -174,4 +174,4 @@ private:
 	uint8_t m_mru[6];
 	uint8_t m_mru[6];
 };
 };
 
 
-#endif // __RECTPACK_H__
+#endif // RECTPACK_H_HEADER_GUARD

+ 3 - 3
tools/geometryc/bounds.h

@@ -3,8 +3,8 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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
 struct Aabb
 {
 {
@@ -44,4 +44,4 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num
 /// Calculate minimum bounding sphere.
 /// Calculate minimum bounding sphere.
 void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step = 0.01f);
 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

+ 3 - 3
tools/geometryc/math.h

@@ -5,8 +5,8 @@
 
 
 // FPU math lib
 // 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
 #define _USE_MATH_DEFINES
 #include <math.h>
 #include <math.h>
@@ -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;
 	_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

+ 3 - 3
tools/geometryc/tokenizecmd.h

@@ -3,9 +3,9 @@
  * License: http://www.opensource.org/licenses/BSD-2-Clause
  * 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');
 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