Explorar o código

Merge pull request #2 from sztanpet/includeguard

modernize header guards to #pragma once
Jim %!s(int64=12) %!d(string=hai) anos
pai
achega
1493a325bb
Modificáronse 51 ficheiros con 52 adicións e 205 borrados
  1. 1 4
      libobs-d3d11/d3d11-exports.h
  2. 1 4
      libobs-opengl/gl-exports.h
  3. 1 4
      libobs-opengl/gl-helpers.h
  4. 1 4
      libobs-opengl/gl-shaderparser.h
  5. 1 6
      libobs-opengl/gl-subsystem.h
  6. 1 4
      libobs/graphics/axisang.h
  7. 1 4
      libobs/graphics/bounds.h
  8. 1 4
      libobs/graphics/effect-parser.h
  9. 1 4
      libobs/graphics/effect.h
  10. 1 4
      libobs/graphics/graphics-internal.h
  11. 1 4
      libobs/graphics/graphics.h
  12. 1 4
      libobs/graphics/input.h
  13. 1 4
      libobs/graphics/math-defs.h
  14. 1 4
      libobs/graphics/math-extra.h
  15. 1 4
      libobs/graphics/matrix3.h
  16. 1 4
      libobs/graphics/matrix4.h
  17. 1 4
      libobs/graphics/plane.h
  18. 1 4
      libobs/graphics/quat.h
  19. 1 4
      libobs/graphics/shader-parser.h
  20. 1 3
      libobs/graphics/vec2.h
  21. 1 4
      libobs/graphics/vec3.h
  22. 1 4
      libobs/graphics/vec4.h
  23. 1 4
      libobs/media-io/audio-io.h
  24. 1 4
      libobs/media-io/media-io.h
  25. 1 4
      libobs/media-io/video-io.h
  26. 1 4
      libobs/obs-data.h
  27. 1 4
      libobs/obs-defs.h
  28. 1 4
      libobs/obs-module.h
  29. 1 4
      libobs/obs-output.h
  30. 1 4
      libobs/obs-scene.h
  31. 1 4
      libobs/obs-service.h
  32. 1 4
      libobs/obs-source.h
  33. 1 4
      libobs/obs.h
  34. 1 4
      libobs/util/base.h
  35. 1 4
      libobs/util/bmem.h
  36. 1 4
      libobs/util/c99defs.h
  37. 1 4
      libobs/util/cf-lexer.h
  38. 1 4
      libobs/util/cf-parser.h
  39. 1 4
      libobs/util/config-file.h
  40. 1 4
      libobs/util/darray.h
  41. 1 4
      libobs/util/dstr.h
  42. 1 4
      libobs/util/lexer.h
  43. 1 4
      libobs/util/platform.h
  44. 1 4
      libobs/util/serializer.h
  45. 1 4
      libobs/util/text-lookup.h
  46. 1 4
      libobs/util/threading.h
  47. 2 4
      libobs/util/utf8.h
  48. 1 4
      libobs/util/vc/stdbool.h
  49. 1 4
      test/test-input/test-filter.h
  50. 1 4
      test/test-input/test-input-exports.h
  51. 1 4
      test/test-input/test-random.h

+ 1 - 4
libobs-d3d11/d3d11-exports.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GS_D3D11EXPORTS_H
-#define GS_D3D11EXPORTS_H
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 
 
@@ -196,5 +195,3 @@ EXPORT void shader_setval(shader_t shader, sparam_t param, const void *val,
 EXPORT void shader_setdefault(shader_t shader, sparam_t param);
 EXPORT void shader_setdefault(shader_t shader, sparam_t param);
 
 
 }
 }
-
-#endif

+ 1 - 4
libobs-opengl/gl-exports.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GS_GLEXPORTS
-#define GS_GLEXPORTS
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 
 
@@ -188,5 +187,3 @@ EXPORT void shader_settexture(shader_t shader, sparam_t param, texture_t val);
 EXPORT void shader_setval(shader_t shader, sparam_t param, const void *val,
 EXPORT void shader_setval(shader_t shader, sparam_t param, const void *val,
 		size_t size);
 		size_t size);
 EXPORT void shader_setdefault(shader_t shader, sparam_t param);
 EXPORT void shader_setdefault(shader_t shader, sparam_t param);
-
-#endif

+ 1 - 4
libobs-opengl/gl-helpers.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GL_HELPERS_H
-#define GL_HELPERS_H
+#pragma once
 
 
 /*
 /*
  * Okay, so GL error handling is..  unclean to work with.  I don't want
  * Okay, so GL error handling is..  unclean to work with.  I don't want
@@ -128,5 +127,3 @@ extern bool gl_create_buffer(GLenum target, GLuint *buffer, GLsizeiptr size,
 
 
 extern bool update_buffer(GLenum target, GLuint buffer, void *data,
 extern bool update_buffer(GLenum target, GLuint buffer, void *data,
 		size_t size);
 		size_t size);
-
-#endif

+ 1 - 4
libobs-opengl/gl-shaderparser.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GL_SHADER_PARSER_H
-#define GL_SHADER_PARSER_H
+#pragma once
 
 
 /*
 /*
  *   Parses shaders into GLSL.  Shaders are almost identical to HLSL
  *   Parses shaders into GLSL.  Shaders are almost identical to HLSL
@@ -67,5 +66,3 @@ static inline void gl_shader_parser_free(struct gl_shader_parser *glsp)
 
 
 extern bool gl_shader_parse(struct gl_shader_parser *glsp,
 extern bool gl_shader_parse(struct gl_shader_parser *glsp,
 		const char *shader_str, const char *file);
 		const char *shader_str, const char *file);
-
-#endif

+ 1 - 6
libobs-opengl/gl-subsystem.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GL_SUBSYSTEM_H
-#define GL_SUBSYSTEM_H
+#pragma once
 
 
 #include "util/darray.h"
 #include "util/darray.h"
 #include "graphics/graphics.h"
 #include "graphics/graphics.h"
@@ -459,7 +458,3 @@ extern void                  gl_platform_destroy(struct gl_platform *platform);
 
 
 extern struct gl_windowinfo *gl_windowinfo_create(struct gs_init_data *info);
 extern struct gl_windowinfo *gl_windowinfo_create(struct gs_init_data *info);
 extern void                  gl_windowinfo_destroy(struct gl_windowinfo *wi);
 extern void                  gl_windowinfo_destroy(struct gl_windowinfo *wi);
-
-
-
-#endif

+ 1 - 4
libobs/graphics/axisang.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef AXISANG_H
-#define AXISANG_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 
 
@@ -63,5 +62,3 @@ EXPORT void axisang_from_quat(struct axisang *dst, const struct quat *q);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/bounds.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef BOUNDS_H
-#define BOUNDS_H
+#pragma once
 
 
 #include "math-defs.h"
 #include "math-defs.h"
 #include "vec3.h"
 #include "vec3.h"
@@ -131,5 +130,3 @@ EXPORT float bounds_min_dist(const struct bounds *b, const struct plane *p);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/effect-parser.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef EFFECT_PARSER_H
-#define EFFECT_PARSER_H
+#pragma once
 
 
 #include "../util/darray.h"
 #include "../util/darray.h"
 #include "../util/cf-parser.h"
 #include "../util/cf-parser.h"
@@ -282,5 +281,3 @@ extern bool ep_parse(struct effect_parser *ep, effect_t effect,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/effect.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef EFFECT_H
-#define EFFECT_H
+#pragma once
 
 
 #include "effect-parser.h"
 #include "effect-parser.h"
 #include "graphics.h"
 #include "graphics.h"
@@ -177,5 +176,3 @@ EXPORT void effect_upload_shader_params(effect_t effect, shader_t shader,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/graphics-internal.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GRAPHICS_INTERNAL_H
-#define GRAPHICS_INTERNAL_H
+#pragma once
 
 
 #include "../util/darray.h"
 #include "../util/darray.h"
 #include "graphics.h"
 #include "graphics.h"
@@ -225,5 +224,3 @@ struct graphics_subsystem {
 	DARRAY(uint32_t)       colors;
 	DARRAY(uint32_t)       colors;
 	DARRAY(struct vec2)    texverts[16];
 	DARRAY(struct vec2)    texverts[16];
 };
 };
-
-#endif

+ 1 - 4
libobs/graphics/graphics.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef GRAPHICS_H
-#define GRAPHICS_H
+#pragma once
 
 
 #include "../util/bmem.h"
 #include "../util/bmem.h"
 #include "input.h"
 #include "input.h"
@@ -706,5 +705,3 @@ static inline uint32_t gs_num_total_levels(uint32_t width, uint32_t height)
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/input.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef INPUT_H
-#define INPUT_H
+#pragma once
 
 
 /* TODO: incomplete/may not be necessary */
 /* TODO: incomplete/may not be necessary */
 
 
@@ -151,5 +150,3 @@ EXPORT int input_getbuttonstate(input_t input, uint32_t button);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/math-defs.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef MATH_DEFS
-#define MATH_DEFS
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 #include <math.h>
 #include <math.h>
@@ -44,5 +43,3 @@ static inline bool close_float(float f1, float f2, float precision)
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/math-extra.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef MATH_EXTRA_H
-#define MATH_EXTRA_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 
 
@@ -62,5 +61,3 @@ EXPORT float rand_float(int positive_only);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/matrix3.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef MATRIX_H
-#define MATRIX_H
+#pragma once
 
 
 #include "vec3.h"
 #include "vec3.h"
 
 
@@ -83,5 +82,3 @@ EXPORT void matrix3_mirrorv(struct matrix3 *dst, const struct matrix3 *m,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/matrix4.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef MATRIX4_H
-#define MATRIX4_H
+#pragma once
 
 
 #include "vec4.h"
 #include "vec4.h"
 
 
@@ -72,5 +71,3 @@ EXPORT void matrix4_perspective(struct matrix4 *dst, float angle,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/plane.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef PLANE_H
-#define PLANE_H
+#pragma once
 
 
 #include "math-defs.h"
 #include "math-defs.h"
 #include "vec3.h"
 #include "vec3.h"
@@ -97,5 +96,3 @@ static inline bool plane_coplanar(const struct plane *p1,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/quat.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef QUAT_H
-#define QUAT_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 #include "math-defs.h"
 #include "math-defs.h"
@@ -181,5 +180,3 @@ EXPORT void quat_interpolate_cubic(struct quat *dst, const struct quat *q1,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/shader-parser.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef SHADER_PARSER_H
-#define SHADER_PARSER_H
+#pragma once
 
 
 #include "../util/cf-parser.h"
 #include "../util/cf-parser.h"
 #include "graphics.h"
 #include "graphics.h"
@@ -277,5 +276,3 @@ static inline struct shader_func *shader_parser_getfunc(
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 3
libobs/graphics/vec2.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef VECT2_H
-#define VECT2_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 #include <math.h>
 #include <math.h>
@@ -168,4 +167,3 @@ EXPORT void vec2_norm(struct vec2 *dst, const struct vec2 *v);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-#endif

+ 1 - 4
libobs/graphics/vec3.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef VECT_H
-#define VECT_H
+#pragma once
 
 
 #include "math-defs.h"
 #include "math-defs.h"
 #include <xmmintrin.h>
 #include <xmmintrin.h>
@@ -232,5 +231,3 @@ EXPORT void vec3_rand(struct vec3 *dst, int positive_only);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/graphics/vec4.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef VECT4_H
-#define VECT4_H
+#pragma once
 
 
 #include "math-defs.h"
 #include "math-defs.h"
 #include <xmmintrin.h>
 #include <xmmintrin.h>
@@ -249,5 +248,3 @@ EXPORT void vec4_transform(struct vec4 *dst, const struct vec4 *v,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/media-io/audio-io.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef AUDIO_IO_H
-#define AUDIO_IO_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 #include "media-io.h"
 #include "media-io.h"
@@ -87,5 +86,3 @@ EXPORT void audio_output_close(audio_t audio);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/media-io/media-io.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef MEDIA_IO_H
-#define MEDIA_IO_H
+#pragma once
 
 
 /*
 /*
  * Media input/output components used for connecting media outputs/inputs
  * Media input/output components used for connecting media outputs/inputs
@@ -73,5 +72,3 @@ EXPORT void    media_close(media_t media);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/media-io/video-io.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef VIDEO_IO_H
-#define VIDEO_IO_H
+#pragma once
 
 
 #include "../util/c99defs.h"
 #include "../util/c99defs.h"
 #include "media-io.h"
 #include "media-io.h"
@@ -65,5 +64,3 @@ EXPORT void     video_output_close(video_t video);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/obs-data.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_DATA_H
-#define OBS_DATA_H
+#pragma once
 
 
 #include "util/darray.h"
 #include "util/darray.h"
 #include "util/threading.h"
 #include "util/threading.h"
@@ -79,5 +78,3 @@ struct obs_data {
 };
 };
 
 
 extern void *obs_video_thread(void *param);
 extern void *obs_video_thread(void *param);
-
-#endif

+ 1 - 4
libobs/obs-defs.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_DEFS_H
-#define OBS_DEFS_H
+#pragma once
 
 
 #define MODULE_SUCCESS           0
 #define MODULE_SUCCESS           0
 #define MODULE_ERROR            -1
 #define MODULE_ERROR            -1
@@ -26,5 +25,3 @@
 #define SOURCE_VIDEO (1<<0)
 #define SOURCE_VIDEO (1<<0)
 #define SOURCE_AUDIO (1<<1)
 #define SOURCE_AUDIO (1<<1)
 #define SOURCE_ASYNC (1<<2)
 #define SOURCE_ASYNC (1<<2)
-
-#endif

+ 1 - 4
libobs/obs-module.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_MODULE_H
-#define OBS_MODULE_H
+#pragma once
 
 
 #include "util/darray.h"
 #include "util/darray.h"
 
 
@@ -28,5 +27,3 @@ struct obs_module {
 extern void *load_module_subfunc(void *module, const char *module_name,
 extern void *load_module_subfunc(void *module, const char *module_name,
 		const char *name, const char *func, bool required);
 		const char *name, const char *func, bool required);
 extern void free_module(struct obs_module *mod);
 extern void free_module(struct obs_module *mod);
-
-#endif

+ 1 - 4
libobs/obs-output.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_OUTPUT_H
-#define OBS_OUTPUT_H
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 #include "util/dstr.h"
 #include "util/dstr.h"
@@ -115,5 +114,3 @@ struct obs_output {
 
 
 extern bool get_output_info(void *module, const char *module_name,
 extern bool get_output_info(void *module, const char *module_name,
 		const char *output_name, struct output_info *info);
 		const char *output_name, struct output_info *info);
-
-#endif

+ 1 - 4
libobs/obs-scene.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_SCENE_H
-#define OBS_SCENE_H
+#pragma once
 
 
 #include "obs.h"
 #include "obs.h"
 #include "obs-source.h"
 #include "obs-source.h"
@@ -38,5 +37,3 @@ struct obs_scene {
 	source_t source;
 	source_t source;
 	DARRAY(struct obs_scene_item*) items;
 	DARRAY(struct obs_scene_item*) items;
 };
 };
-
-#endif

+ 1 - 4
libobs/obs-service.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef OBS_SERVICE_H
-#define OBS_SERVICE_H
+#pragma once
 
 
 struct service_data;
 struct service_data;
 
 
@@ -29,5 +28,3 @@ struct service_info {
 	/* get (viewers/etc) */
 	/* get (viewers/etc) */
 	/* send (current game/title/activate commercial/etc) */
 	/* send (current game/title/activate commercial/etc) */
 };
 };
-
-#endif

+ 1 - 4
libobs/obs-source.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef SOURCE_H
-#define SOURCE_H 
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 #include "util/darray.h"
 #include "util/darray.h"
@@ -204,5 +203,3 @@ extern void source_init(obs_t obs, struct obs_source *source);
 EXPORT void source_activate(source_t source);
 EXPORT void source_activate(source_t source);
 EXPORT void source_deactivate(source_t source);
 EXPORT void source_deactivate(source_t source);
 EXPORT void source_video_tick(source_t source, float seconds);
 EXPORT void source_video_tick(source_t source, float seconds);
-
-#endif

+ 1 - 4
libobs/obs.h

@@ -15,8 +15,7 @@
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef LIBOBS_H
-#define LIBOBS_H
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 #include "graphics/graphics.h"
 #include "graphics/graphics.h"
@@ -300,5 +299,3 @@ EXPORT void       output_save_settings(output_t output, const char *settings);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/base.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef BASE_H
-#define BASE_H
+#pragma once
 
 
 #include <wctype.h>
 #include <wctype.h>
 #include <stdarg.h>
 #include <stdarg.h>
@@ -54,5 +53,3 @@ EXPORT void bcrash(const char *format, ...);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/bmem.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef BALLOC_H
-#define BALLOC_H
+#pragma once
 
 
 #include "c99defs.h"
 #include "c99defs.h"
 #include "base.h"
 #include "base.h"
@@ -92,5 +91,3 @@ static inline wchar_t *bwstrdup(const wchar_t *str)
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/c99defs.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef C99DEFS_H
-#define C99DEFS_H
+#pragma once
 
 
 /*
 /*
  * Contains hacks for getting some C99 stuff working in VC, things like
  * Contains hacks for getting some C99 stuff working in VC, things like
@@ -71,5 +70,3 @@ typedef long ssize_t;
 #include <sys/types.h>
 #include <sys/types.h>
 
 
 #endif /* _MSC_VER */
 #endif /* _MSC_VER */
-
-#endif

+ 1 - 4
libobs/util/cf-lexer.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef CF_LEXER_H
-#define CF_LEXER_H
+#pragma once
 
 
 #include "lexer.h"
 #include "lexer.h"
 
 
@@ -212,5 +211,3 @@ static inline struct cf_token *cf_preprocessor_gettokens(
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/cf-parser.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef CF_PARSER_H
-#define CF_PARSER_H
+#pragma once
 
 
 #include "cf-lexer.h"
 #include "cf-lexer.h"
 
 
@@ -280,5 +279,3 @@ static inline int next_name_ref(struct cf_parser *p, struct strref *dst,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/config-file.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef CONFIG_FILE_H
-#define CONFIG_FILE_H
+#pragma once
 
 
 #include "c99defs.h"
 #include "c99defs.h"
 
 
@@ -83,5 +82,3 @@ EXPORT double config_get_double(config_t config, const char *section,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/darray.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef DARRAY_H
-#define DARRAY_H
+#pragma once
 
 
 #include "c99defs.h"
 #include "c99defs.h"
 #include <string.h>
 #include <string.h>
@@ -541,5 +540,3 @@ static inline void darray_swap(const size_t element_size,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/dstr.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef DSTR_H
-#define DSTR_H
+#pragma once
 
 
 #include <string.h>
 #include <string.h>
 #include <stdarg.h>
 #include <stdarg.h>
@@ -306,5 +305,3 @@ static inline int dstr_ncmpi(const struct dstr *str1, const char *str2,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/lexer.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef LEXER_H
-#define LEXER_H
+#pragma once
 
 
 #include "c99defs.h"
 #include "c99defs.h"
 #include "dstr.h"
 #include "dstr.h"
@@ -290,5 +289,3 @@ EXPORT void lexer_getstroffset(const struct lexer *lex, const char *str,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/platform.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef PLATFORM_H
-#define PLATFORM_H
+#pragma once
 
 
 #include <stdio.h>
 #include <stdio.h>
 #include <wchar.h>
 #include <wchar.h>
@@ -78,5 +77,3 @@ EXPORT off_t ftello(FILE *stream);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/serializer.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef SERIALIZER_H
-#define SERIALIZER_H
+#pragma once
 
 
 /*
 /*
  *   General programmable serialization functions.  (A shared interface to
  *   General programmable serialization functions.  (A shared interface to
@@ -124,5 +123,3 @@ static inline void serializer_write_double(struct serializer *s, double d)
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/text-lookup.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef TEXT_LOOKUP_H
-#define TEXT_LOOKUP_H
+#pragma once
 
 
 /*
 /*
  * Text Lookup interface
  * Text Lookup interface
@@ -51,5 +50,3 @@ EXPORT bool text_lookup_getstr(lookup_t lookup, const char *lookup_val,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
libobs/util/threading.h

@@ -21,8 +21,7 @@
      distribution.
      distribution.
 ******************************************************************************/
 ******************************************************************************/
 
 
-#ifndef BASE_THREADING_H
-#define BASE_THREADING_H
+#pragma once
 
 
 /*
 /*
  *   Allows posix thread usage on windows as well as other operating systems.
  *   Allows posix thread usage on windows as well as other operating systems.
@@ -129,5 +128,3 @@ static inline void event_reset(event_t *event)
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 2 - 4
libobs/util/utf8.h

@@ -14,11 +14,11 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
  */
 
 
+#pragma once
+
 /*
 /*
  * utf8: implementation of UTF-8 charset encoding (RFC3629).
  * utf8: implementation of UTF-8 charset encoding (RFC3629).
  */
  */
-#ifndef _UTF8_H_
-#define _UTF8_H_
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus
 extern "C" {
 extern "C" {
@@ -35,5 +35,3 @@ size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out,
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif /* !_UTF8_H_ */

+ 1 - 4
libobs/util/vc/stdbool.h

@@ -1,5 +1,4 @@
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#pragma once
 
 
 #if !defined(__cplusplus)
 #if !defined(__cplusplus)
 typedef int8_t _Bool; 
 typedef int8_t _Bool; 
@@ -8,5 +7,3 @@ typedef int8_t _Bool;
 #define false 0
 #define false 0
 #define __bool_true_false_are_defined 1
 #define __bool_true_false_are_defined 1
 #endif
 #endif
-
-#endif

+ 1 - 4
test/test-input/test-filter.h

@@ -1,5 +1,4 @@
-#ifndef FILTER_TEST_H
-#define FILTER_TEST_H
+#pragma once
 
 
 #include "obs.h"
 #include "obs.h"
 
 
@@ -23,5 +22,3 @@ EXPORT void test_video_render(struct test_filter *rt);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
test/test-input/test-input-exports.h

@@ -1,5 +1,4 @@
-#ifndef OBS_CAPTURE_EXPORTS_H
-#define OBS_CAPTURE_EXPORTS_H
+#pragma once
 
 
 #include "util/c99defs.h"
 #include "util/c99defs.h"
 
 
@@ -13,5 +12,3 @@ EXPORT bool enum_filters(size_t idx, const char **name);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif

+ 1 - 4
test/test-input/test-random.h

@@ -1,5 +1,4 @@
-#ifndef RANDOM_TEX_H
-#define RANDOM_TEX_H
+#pragma once
 
 
 #include "obs.h"
 #include "obs.h"
 
 
@@ -24,5 +23,3 @@ EXPORT int random_getheight(struct random_tex *rt);
 #ifdef __cplusplus
 #ifdef __cplusplus
 }
 }
 #endif
 #endif
-
-#endif