From 5a376cb0615b274a063db5675aebe62925083c48 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Sun, 6 Sep 2020 13:40:30 +0100 Subject: [PATCH] Fix header guards in modules: - Add missing header guards to various modules' register_types.h - Add header guard to basis_universal/texture_basisu.h. - Ensure header guard encloses entire header in webrtc/webrtc_data_channel_js.h. --- modules/arkit/register_types.h | 5 +++++ modules/basis_universal/texture_basisu.h | 5 +++++ modules/camera/register_types.h | 5 +++++ modules/denoise/register_types.h | 5 +++++ modules/mono/register_types.h | 5 +++++ modules/webrtc/webrtc_data_channel_js.h | 8 ++++---- modules/webrtc/webrtc_multiplayer.h | 2 +- 7 files changed, 30 insertions(+), 5 deletions(-) diff --git a/modules/arkit/register_types.h b/modules/arkit/register_types.h index 5c697baf681..f8939a1e3f9 100644 --- a/modules/arkit/register_types.h +++ b/modules/arkit/register_types.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef ARKIT_REGISTER_TYPES_H +#define ARKIT_REGISTER_TYPES_H + void register_arkit_types(); void unregister_arkit_types(); + +#endif // ARKIT_REGISTER_TYPES_H diff --git a/modules/basis_universal/texture_basisu.h b/modules/basis_universal/texture_basisu.h index 8de151ede0a..20ecf15a597 100644 --- a/modules/basis_universal/texture_basisu.h +++ b/modules/basis_universal/texture_basisu.h @@ -28,6 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef BASIS_UNIVERSAL_TEXTURE_BASISU_H +#define BASIS_UNIVERSAL_TEXTURE_BASISU_H + #include "scene/resources/texture.h" #ifdef TOOLS_ENABLED @@ -75,3 +78,5 @@ public: }; #endif + +#endif // BASIS_UNIVERSAL_TEXTURE_BASISU_H diff --git a/modules/camera/register_types.h b/modules/camera/register_types.h index f2753cb6d77..e34f84bf2c8 100644 --- a/modules/camera/register_types.h +++ b/modules/camera/register_types.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef CAMERA_REGISTER_TYPES_H +#define CAMERA_REGISTER_TYPES_H + void register_camera_types(); void unregister_camera_types(); + +#endif // CAMERA_REGISTER_TYPES_H diff --git a/modules/denoise/register_types.h b/modules/denoise/register_types.h index 2ffc36ee2c3..f0f1f44bfec 100644 --- a/modules/denoise/register_types.h +++ b/modules/denoise/register_types.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef DENOISE_REGISTER_TYPES_H +#define DENOISE_REGISTER_TYPES_H + void register_denoise_types(); void unregister_denoise_types(); + +#endif // DENOISE_REGISTER_TYPES_H diff --git a/modules/mono/register_types.h b/modules/mono/register_types.h index 7fd0d24eb0c..e30d9a8abd0 100644 --- a/modules/mono/register_types.h +++ b/modules/mono/register_types.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ +#ifndef MONO_REGISTER_TYPES_H +#define MONO_REGISTER_TYPES_H + void register_mono_types(); void unregister_mono_types(); + +#endif // MONO_REGISTER_TYPES_H diff --git a/modules/webrtc/webrtc_data_channel_js.h b/modules/webrtc/webrtc_data_channel_js.h index 455866cbf18..7545910e661 100644 --- a/modules/webrtc/webrtc_data_channel_js.h +++ b/modules/webrtc/webrtc_data_channel_js.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef JAVASCRIPT_ENABLED - #ifndef WEBRTC_DATA_CHANNEL_JS_H #define WEBRTC_DATA_CHANNEL_JS_H +#ifdef JAVASCRIPT_ENABLED + #include "webrtc_data_channel.h" class WebRTCDataChannelJS : public WebRTCDataChannel { @@ -88,6 +88,6 @@ public: ~WebRTCDataChannelJS(); }; -#endif // WEBRTC_DATA_CHANNEL_JS_H - #endif // JAVASCRIPT_ENABLED + +#endif // WEBRTC_DATA_CHANNEL_JS_H diff --git a/modules/webrtc/webrtc_multiplayer.h b/modules/webrtc/webrtc_multiplayer.h index bfdcf6daa1b..fb37bd7722e 100644 --- a/modules/webrtc/webrtc_multiplayer.h +++ b/modules/webrtc/webrtc_multiplayer.h @@ -112,4 +112,4 @@ public: ConnectionStatus get_connection_status() const override; }; -#endif +#endif // WEBRTC_MULTIPLAYER_H