diff --git a/libobs-d3d11/d3d11-exports.h b/libobs-d3d11/d3d11-exports.h
index 865be2646..66b890a0e 100644
--- a/libobs-d3d11/d3d11-exports.h
+++ b/libobs-d3d11/d3d11-exports.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GS_D3D11EXPORTS_H
-#define GS_D3D11EXPORTS_H
+#pragma once
#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);
}
-
-#endif
diff --git a/libobs-opengl/gl-exports.h b/libobs-opengl/gl-exports.h
index 27242217c..116b175b0 100644
--- a/libobs-opengl/gl-exports.h
+++ b/libobs-opengl/gl-exports.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GS_GLEXPORTS
-#define GS_GLEXPORTS
+#pragma once
#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,
size_t size);
EXPORT void shader_setdefault(shader_t shader, sparam_t param);
-
-#endif
diff --git a/libobs-opengl/gl-helpers.h b/libobs-opengl/gl-helpers.h
index 1d7f84860..00068bf74 100644
--- a/libobs-opengl/gl-helpers.h
+++ b/libobs-opengl/gl-helpers.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GL_HELPERS_H
-#define GL_HELPERS_H
+#pragma once
/*
* 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,
size_t size);
-
-#endif
diff --git a/libobs-opengl/gl-shaderparser.h b/libobs-opengl/gl-shaderparser.h
index f6a1165ae..1a75b4adf 100644
--- a/libobs-opengl/gl-shaderparser.h
+++ b/libobs-opengl/gl-shaderparser.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GL_SHADER_PARSER_H
-#define GL_SHADER_PARSER_H
+#pragma once
/*
* 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,
const char *shader_str, const char *file);
-
-#endif
diff --git a/libobs-opengl/gl-subsystem.h b/libobs-opengl/gl-subsystem.h
index 50c3ae583..a60da0f34 100644
--- a/libobs-opengl/gl-subsystem.h
+++ b/libobs-opengl/gl-subsystem.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GL_SUBSYSTEM_H
-#define GL_SUBSYSTEM_H
+#pragma once
#include "util/darray.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 void gl_windowinfo_destroy(struct gl_windowinfo *wi);
-
-
-
-#endif
diff --git a/libobs/graphics/axisang.h b/libobs/graphics/axisang.h
index 8483713dc..9933f8498 100644
--- a/libobs/graphics/axisang.h
+++ b/libobs/graphics/axisang.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef AXISANG_H
-#define AXISANG_H
+#pragma once
#include "../util/c99defs.h"
@@ -63,5 +62,3 @@ EXPORT void axisang_from_quat(struct axisang *dst, const struct quat *q);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/bounds.h b/libobs/graphics/bounds.h
index 9e10b0fa7..220ba4815 100644
--- a/libobs/graphics/bounds.h
+++ b/libobs/graphics/bounds.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef BOUNDS_H
-#define BOUNDS_H
+#pragma once
#include "math-defs.h"
#include "vec3.h"
@@ -131,5 +130,3 @@ EXPORT float bounds_min_dist(const struct bounds *b, const struct plane *p);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/effect-parser.h b/libobs/graphics/effect-parser.h
index 297f8ee1c..b48f70c7a 100644
--- a/libobs/graphics/effect-parser.h
+++ b/libobs/graphics/effect-parser.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef EFFECT_PARSER_H
-#define EFFECT_PARSER_H
+#pragma once
#include "../util/darray.h"
#include "../util/cf-parser.h"
@@ -282,5 +281,3 @@ extern bool ep_parse(struct effect_parser *ep, effect_t effect,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/effect.h b/libobs/graphics/effect.h
index 3da3df9b8..0b61065a8 100644
--- a/libobs/graphics/effect.h
+++ b/libobs/graphics/effect.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef EFFECT_H
-#define EFFECT_H
+#pragma once
#include "effect-parser.h"
#include "graphics.h"
@@ -177,5 +176,3 @@ EXPORT void effect_upload_shader_params(effect_t effect, shader_t shader,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/graphics-internal.h b/libobs/graphics/graphics-internal.h
index d3b1dccf1..347eff0e9 100644
--- a/libobs/graphics/graphics-internal.h
+++ b/libobs/graphics/graphics-internal.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GRAPHICS_INTERNAL_H
-#define GRAPHICS_INTERNAL_H
+#pragma once
#include "../util/darray.h"
#include "graphics.h"
@@ -225,5 +224,3 @@ struct graphics_subsystem {
DARRAY(uint32_t) colors;
DARRAY(struct vec2) texverts[16];
};
-
-#endif
diff --git a/libobs/graphics/graphics.h b/libobs/graphics/graphics.h
index 2b6690f28..0dcdf945d 100644
--- a/libobs/graphics/graphics.h
+++ b/libobs/graphics/graphics.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef GRAPHICS_H
-#define GRAPHICS_H
+#pragma once
#include "../util/bmem.h"
#include "input.h"
@@ -706,5 +705,3 @@ static inline uint32_t gs_num_total_levels(uint32_t width, uint32_t height)
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/input.h b/libobs/graphics/input.h
index 5762f92d4..2d1b9a2a7 100644
--- a/libobs/graphics/input.h
+++ b/libobs/graphics/input.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef INPUT_H
-#define INPUT_H
+#pragma once
/* TODO: incomplete/may not be necessary */
@@ -151,5 +150,3 @@ EXPORT int input_getbuttonstate(input_t input, uint32_t button);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/math-defs.h b/libobs/graphics/math-defs.h
index 48951e5a8..576ae74ec 100644
--- a/libobs/graphics/math-defs.h
+++ b/libobs/graphics/math-defs.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef MATH_DEFS
-#define MATH_DEFS
+#pragma once
#include "../util/c99defs.h"
#include
@@ -44,5 +43,3 @@ static inline bool close_float(float f1, float f2, float precision)
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/math-extra.h b/libobs/graphics/math-extra.h
index 41e72fe38..e74763232 100644
--- a/libobs/graphics/math-extra.h
+++ b/libobs/graphics/math-extra.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef MATH_EXTRA_H
-#define MATH_EXTRA_H
+#pragma once
#include "../util/c99defs.h"
@@ -62,5 +61,3 @@ EXPORT float rand_float(int positive_only);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/matrix3.h b/libobs/graphics/matrix3.h
index 4a79dc842..8d19d8a91 100644
--- a/libobs/graphics/matrix3.h
+++ b/libobs/graphics/matrix3.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef MATRIX_H
-#define MATRIX_H
+#pragma once
#include "vec3.h"
@@ -83,5 +82,3 @@ EXPORT void matrix3_mirrorv(struct matrix3 *dst, const struct matrix3 *m,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/matrix4.h b/libobs/graphics/matrix4.h
index b72f280b7..9b0f9bf19 100644
--- a/libobs/graphics/matrix4.h
+++ b/libobs/graphics/matrix4.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef MATRIX4_H
-#define MATRIX4_H
+#pragma once
#include "vec4.h"
@@ -72,5 +71,3 @@ EXPORT void matrix4_perspective(struct matrix4 *dst, float angle,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/plane.h b/libobs/graphics/plane.h
index f102f1b64..80d35126b 100644
--- a/libobs/graphics/plane.h
+++ b/libobs/graphics/plane.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef PLANE_H
-#define PLANE_H
+#pragma once
#include "math-defs.h"
#include "vec3.h"
@@ -97,5 +96,3 @@ static inline bool plane_coplanar(const struct plane *p1,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/quat.h b/libobs/graphics/quat.h
index b98c057e2..2293de580 100644
--- a/libobs/graphics/quat.h
+++ b/libobs/graphics/quat.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef QUAT_H
-#define QUAT_H
+#pragma once
#include "../util/c99defs.h"
#include "math-defs.h"
@@ -181,5 +180,3 @@ EXPORT void quat_interpolate_cubic(struct quat *dst, const struct quat *q1,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/shader-parser.h b/libobs/graphics/shader-parser.h
index 384459cf0..183150412 100644
--- a/libobs/graphics/shader-parser.h
+++ b/libobs/graphics/shader-parser.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef SHADER_PARSER_H
-#define SHADER_PARSER_H
+#pragma once
#include "../util/cf-parser.h"
#include "graphics.h"
@@ -277,5 +276,3 @@ static inline struct shader_func *shader_parser_getfunc(
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/vec2.h b/libobs/graphics/vec2.h
index ce0879513..76186d20a 100644
--- a/libobs/graphics/vec2.h
+++ b/libobs/graphics/vec2.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef VECT2_H
-#define VECT2_H
+#pragma once
#include "../util/c99defs.h"
#include
@@ -168,4 +167,3 @@ EXPORT void vec2_norm(struct vec2 *dst, const struct vec2 *v);
#ifdef __cplusplus
}
#endif
-#endif
diff --git a/libobs/graphics/vec3.h b/libobs/graphics/vec3.h
index 0bf48085a..0233f6127 100644
--- a/libobs/graphics/vec3.h
+++ b/libobs/graphics/vec3.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef VECT_H
-#define VECT_H
+#pragma once
#include "math-defs.h"
#include
@@ -232,5 +231,3 @@ EXPORT void vec3_rand(struct vec3 *dst, int positive_only);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/graphics/vec4.h b/libobs/graphics/vec4.h
index 2da744a48..857d3ceda 100644
--- a/libobs/graphics/vec4.h
+++ b/libobs/graphics/vec4.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef VECT4_H
-#define VECT4_H
+#pragma once
#include "math-defs.h"
#include
@@ -249,5 +248,3 @@ EXPORT void vec4_transform(struct vec4 *dst, const struct vec4 *v,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/media-io/audio-io.h b/libobs/media-io/audio-io.h
index 527f5b870..0a0f6495a 100644
--- a/libobs/media-io/audio-io.h
+++ b/libobs/media-io/audio-io.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef AUDIO_IO_H
-#define AUDIO_IO_H
+#pragma once
#include "../util/c99defs.h"
#include "media-io.h"
@@ -87,5 +86,3 @@ EXPORT void audio_output_close(audio_t audio);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/media-io/media-io.h b/libobs/media-io/media-io.h
index 8e8fd2ec8..4493bae58 100644
--- a/libobs/media-io/media-io.h
+++ b/libobs/media-io/media-io.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef MEDIA_IO_H
-#define MEDIA_IO_H
+#pragma once
/*
* Media input/output components used for connecting media outputs/inputs
@@ -73,5 +72,3 @@ EXPORT void media_close(media_t media);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/media-io/video-io.h b/libobs/media-io/video-io.h
index ec6f09d6b..7881c9e38 100644
--- a/libobs/media-io/video-io.h
+++ b/libobs/media-io/video-io.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef VIDEO_IO_H
-#define VIDEO_IO_H
+#pragma once
#include "../util/c99defs.h"
#include "media-io.h"
@@ -65,5 +64,3 @@ EXPORT void video_output_close(video_t video);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/obs-data.h b/libobs/obs-data.h
index c22f0fb69..40a32a8a4 100644
--- a/libobs/obs-data.h
+++ b/libobs/obs-data.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_DATA_H
-#define OBS_DATA_H
+#pragma once
#include "util/darray.h"
#include "util/threading.h"
@@ -79,5 +78,3 @@ struct obs_data {
};
extern void *obs_video_thread(void *param);
-
-#endif
diff --git a/libobs/obs-defs.h b/libobs/obs-defs.h
index b857fea8f..39087656f 100644
--- a/libobs/obs-defs.h
+++ b/libobs/obs-defs.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_DEFS_H
-#define OBS_DEFS_H
+#pragma once
#define MODULE_SUCCESS 0
#define MODULE_ERROR -1
@@ -26,5 +25,3 @@
#define SOURCE_VIDEO (1<<0)
#define SOURCE_AUDIO (1<<1)
#define SOURCE_ASYNC (1<<2)
-
-#endif
diff --git a/libobs/obs-module.h b/libobs/obs-module.h
index 62182a0b1..0503f6b8c 100644
--- a/libobs/obs-module.h
+++ b/libobs/obs-module.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_MODULE_H
-#define OBS_MODULE_H
+#pragma once
#include "util/darray.h"
@@ -28,5 +27,3 @@ struct obs_module {
extern void *load_module_subfunc(void *module, const char *module_name,
const char *name, const char *func, bool required);
extern void free_module(struct obs_module *mod);
-
-#endif
diff --git a/libobs/obs-output.h b/libobs/obs-output.h
index 8ffc41315..3b709c2fe 100644
--- a/libobs/obs-output.h
+++ b/libobs/obs-output.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_OUTPUT_H
-#define OBS_OUTPUT_H
+#pragma once
#include "util/c99defs.h"
#include "util/dstr.h"
@@ -115,5 +114,3 @@ struct obs_output {
extern bool get_output_info(void *module, const char *module_name,
const char *output_name, struct output_info *info);
-
-#endif
diff --git a/libobs/obs-scene.h b/libobs/obs-scene.h
index e8eeca699..cc6006eed 100644
--- a/libobs/obs-scene.h
+++ b/libobs/obs-scene.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_SCENE_H
-#define OBS_SCENE_H
+#pragma once
#include "obs.h"
#include "obs-source.h"
@@ -38,5 +37,3 @@ struct obs_scene {
source_t source;
DARRAY(struct obs_scene_item*) items;
};
-
-#endif
diff --git a/libobs/obs-service.h b/libobs/obs-service.h
index b48b86171..d6eb584dc 100644
--- a/libobs/obs-service.h
+++ b/libobs/obs-service.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef OBS_SERVICE_H
-#define OBS_SERVICE_H
+#pragma once
struct service_data;
@@ -29,5 +28,3 @@ struct service_info {
/* get (viewers/etc) */
/* send (current game/title/activate commercial/etc) */
};
-
-#endif
diff --git a/libobs/obs-source.h b/libobs/obs-source.h
index a142ff764..ec9eb60f7 100644
--- a/libobs/obs-source.h
+++ b/libobs/obs-source.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef SOURCE_H
-#define SOURCE_H
+#pragma once
#include "util/c99defs.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_deactivate(source_t source);
EXPORT void source_video_tick(source_t source, float seconds);
-
-#endif
diff --git a/libobs/obs.h b/libobs/obs.h
index 7e76b148a..bf4b1e45e 100644
--- a/libobs/obs.h
+++ b/libobs/obs.h
@@ -15,8 +15,7 @@
along with this program. If not, see .
******************************************************************************/
-#ifndef LIBOBS_H
-#define LIBOBS_H
+#pragma once
#include "util/c99defs.h"
#include "graphics/graphics.h"
@@ -300,5 +299,3 @@ EXPORT void output_save_settings(output_t output, const char *settings);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/base.h b/libobs/util/base.h
index 5640d4182..9f5f73267 100644
--- a/libobs/util/base.h
+++ b/libobs/util/base.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef BASE_H
-#define BASE_H
+#pragma once
#include
#include
@@ -54,5 +53,3 @@ EXPORT void bcrash(const char *format, ...);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/bmem.h b/libobs/util/bmem.h
index 448071d07..535362bf9 100644
--- a/libobs/util/bmem.h
+++ b/libobs/util/bmem.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef BALLOC_H
-#define BALLOC_H
+#pragma once
#include "c99defs.h"
#include "base.h"
@@ -92,5 +91,3 @@ static inline wchar_t *bwstrdup(const wchar_t *str)
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h
index e1508df0a..5cc936c77 100644
--- a/libobs/util/c99defs.h
+++ b/libobs/util/c99defs.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef C99DEFS_H
-#define C99DEFS_H
+#pragma once
/*
* Contains hacks for getting some C99 stuff working in VC, things like
@@ -71,5 +70,3 @@ typedef long ssize_t;
#include
#endif /* _MSC_VER */
-
-#endif
diff --git a/libobs/util/cf-lexer.h b/libobs/util/cf-lexer.h
index d7001a947..65953ac74 100644
--- a/libobs/util/cf-lexer.h
+++ b/libobs/util/cf-lexer.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef CF_LEXER_H
-#define CF_LEXER_H
+#pragma once
#include "lexer.h"
@@ -212,5 +211,3 @@ static inline struct cf_token *cf_preprocessor_gettokens(
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/cf-parser.h b/libobs/util/cf-parser.h
index 3d426239a..097f5e7c9 100644
--- a/libobs/util/cf-parser.h
+++ b/libobs/util/cf-parser.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef CF_PARSER_H
-#define CF_PARSER_H
+#pragma once
#include "cf-lexer.h"
@@ -280,5 +279,3 @@ static inline int next_name_ref(struct cf_parser *p, struct strref *dst,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/config-file.h b/libobs/util/config-file.h
index 98e587b3b..45cb38e8c 100644
--- a/libobs/util/config-file.h
+++ b/libobs/util/config-file.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef CONFIG_FILE_H
-#define CONFIG_FILE_H
+#pragma once
#include "c99defs.h"
@@ -83,5 +82,3 @@ EXPORT double config_get_double(config_t config, const char *section,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/darray.h b/libobs/util/darray.h
index 8a921900b..2f7553f94 100644
--- a/libobs/util/darray.h
+++ b/libobs/util/darray.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef DARRAY_H
-#define DARRAY_H
+#pragma once
#include "c99defs.h"
#include
@@ -541,5 +540,3 @@ static inline void darray_swap(const size_t element_size,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/dstr.h b/libobs/util/dstr.h
index c0f47227d..ac534f2f9 100644
--- a/libobs/util/dstr.h
+++ b/libobs/util/dstr.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef DSTR_H
-#define DSTR_H
+#pragma once
#include
#include
@@ -306,5 +305,3 @@ static inline int dstr_ncmpi(const struct dstr *str1, const char *str2,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/lexer.h b/libobs/util/lexer.h
index c81129188..174518646 100644
--- a/libobs/util/lexer.h
+++ b/libobs/util/lexer.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef LEXER_H
-#define LEXER_H
+#pragma once
#include "c99defs.h"
#include "dstr.h"
@@ -290,5 +289,3 @@ EXPORT void lexer_getstroffset(const struct lexer *lex, const char *str,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/platform.h b/libobs/util/platform.h
index 9b0b84bcf..5ee84cafe 100644
--- a/libobs/util/platform.h
+++ b/libobs/util/platform.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef PLATFORM_H
-#define PLATFORM_H
+#pragma once
#include
#include
@@ -78,5 +77,3 @@ EXPORT off_t ftello(FILE *stream);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/serializer.h b/libobs/util/serializer.h
index b749d48a8..163319cdc 100644
--- a/libobs/util/serializer.h
+++ b/libobs/util/serializer.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef SERIALIZER_H
-#define SERIALIZER_H
+#pragma once
/*
* 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
}
#endif
-
-#endif
diff --git a/libobs/util/text-lookup.h b/libobs/util/text-lookup.h
index 9367dd4f5..6f9e2c0a5 100644
--- a/libobs/util/text-lookup.h
+++ b/libobs/util/text-lookup.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef TEXT_LOOKUP_H
-#define TEXT_LOOKUP_H
+#pragma once
/*
* Text Lookup interface
@@ -51,5 +50,3 @@ EXPORT bool text_lookup_getstr(lookup_t lookup, const char *lookup_val,
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/libobs/util/threading.h b/libobs/util/threading.h
index fef9458b6..ae63a112b 100644
--- a/libobs/util/threading.h
+++ b/libobs/util/threading.h
@@ -21,8 +21,7 @@
distribution.
******************************************************************************/
-#ifndef BASE_THREADING_H
-#define BASE_THREADING_H
+#pragma once
/*
* 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
}
#endif
-
-#endif
diff --git a/libobs/util/utf8.h b/libobs/util/utf8.h
index c289106ff..63227cebb 100644
--- a/libobs/util/utf8.h
+++ b/libobs/util/utf8.h
@@ -14,11 +14,11 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#pragma once
+
/*
* utf8: implementation of UTF-8 charset encoding (RFC3629).
*/
-#ifndef _UTF8_H_
-#define _UTF8_H_
#ifdef __cplusplus
extern "C" {
@@ -35,5 +35,3 @@ size_t wchar_to_utf8(const wchar_t *in, size_t insize, char *out,
#ifdef __cplusplus
}
#endif
-
-#endif /* !_UTF8_H_ */
diff --git a/libobs/util/vc/stdbool.h b/libobs/util/vc/stdbool.h
index b9f1c5009..031dd40cc 100644
--- a/libobs/util/vc/stdbool.h
+++ b/libobs/util/vc/stdbool.h
@@ -1,5 +1,4 @@
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
+#pragma once
#if !defined(__cplusplus)
typedef int8_t _Bool;
@@ -8,5 +7,3 @@ typedef int8_t _Bool;
#define false 0
#define __bool_true_false_are_defined 1
#endif
-
-#endif
diff --git a/test/test-input/test-filter.h b/test/test-input/test-filter.h
index b9811db77..b3e5cf147 100644
--- a/test/test-input/test-filter.h
+++ b/test/test-input/test-filter.h
@@ -1,5 +1,4 @@
-#ifndef FILTER_TEST_H
-#define FILTER_TEST_H
+#pragma once
#include "obs.h"
@@ -23,5 +22,3 @@ EXPORT void test_video_render(struct test_filter *rt);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/test/test-input/test-input-exports.h b/test/test-input/test-input-exports.h
index da410e6e0..280b33a6d 100644
--- a/test/test-input/test-input-exports.h
+++ b/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"
@@ -13,5 +12,3 @@ EXPORT bool enum_filters(size_t idx, const char **name);
#ifdef __cplusplus
}
#endif
-
-#endif
diff --git a/test/test-input/test-random.h b/test/test-input/test-random.h
index 4204eafc2..39b4ff77e 100644
--- a/test/test-input/test-random.h
+++ b/test/test-input/test-random.h
@@ -1,5 +1,4 @@
-#ifndef RANDOM_TEX_H
-#define RANDOM_TEX_H
+#pragma once
#include "obs.h"
@@ -24,5 +23,3 @@ EXPORT int random_getheight(struct random_tex *rt);
#ifdef __cplusplus
}
#endif
-
-#endif