From c6cccdf0c68559e7f531fd7f289259da7d123077 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Thu, 3 Sep 2020 11:28:55 +0100 Subject: [PATCH] Ensure header guards enclose entire header. (cherry picked from commit f6ad1954f76165aefb05e12e5f82cbf5d763c85e) --- core/io/file_access_zip.h | 8 ++++---- drivers/alsa/audio_driver_alsa.h | 8 ++++---- drivers/alsamidi/midi_driver_alsamidi.h | 7 ++++--- drivers/pulseaudio/audio_driver_pulseaudio.h | 8 ++++---- modules/cvtt/register_types.h | 8 ++++---- modules/webrtc/webrtc_data_channel_gdnative.h | 8 ++++---- modules/webrtc/webrtc_peer_connection_gdnative.h | 8 ++++---- 7 files changed, 28 insertions(+), 27 deletions(-) diff --git a/core/io/file_access_zip.h b/core/io/file_access_zip.h index d5ce7d7a8da..17216cc0a60 100644 --- a/core/io/file_access_zip.h +++ b/core/io/file_access_zip.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef MINIZIP_ENABLED - #ifndef FILE_ACCESS_ZIP_H #define FILE_ACCESS_ZIP_H +#ifdef MINIZIP_ENABLED + #include "core/io/file_access_pack.h" #include "core/map.h" @@ -119,6 +119,6 @@ public: ~FileAccessZip(); }; -#endif // FILE_ACCESS_ZIP_H - #endif // MINIZIP_ENABLED + +#endif // FILE_ACCESS_ZIP_H diff --git a/drivers/alsa/audio_driver_alsa.h b/drivers/alsa/audio_driver_alsa.h index 6e4128a0f7e..5706cdf05d5 100644 --- a/drivers/alsa/audio_driver_alsa.h +++ b/drivers/alsa/audio_driver_alsa.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef ALSA_ENABLED - #ifndef AUDIO_DRIVER_ALSA_H #define AUDIO_DRIVER_ALSA_H +#ifdef ALSA_ENABLED + #include "core/os/mutex.h" #include "core/os/thread.h" #include "servers/audio_server.h" @@ -89,6 +89,6 @@ public: ~AudioDriverALSA(); }; -#endif // AUDIO_DRIVER_ALSA_H - #endif // ALSA_ENABLED + +#endif // AUDIO_DRIVER_ALSA_H diff --git a/drivers/alsamidi/midi_driver_alsamidi.h b/drivers/alsamidi/midi_driver_alsamidi.h index 354fcce147c..2e1c4f056f6 100644 --- a/drivers/alsamidi/midi_driver_alsamidi.h +++ b/drivers/alsamidi/midi_driver_alsamidi.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef ALSAMIDI_ENABLED - #ifndef MIDI_DRIVER_ALSAMIDI_H #define MIDI_DRIVER_ALSAMIDI_H +#ifdef ALSAMIDI_ENABLED + #include "core/os/midi_driver.h" #include "core/os/mutex.h" #include "core/os/thread.h" @@ -65,5 +65,6 @@ public: virtual ~MIDIDriverALSAMidi(); }; -#endif // MIDI_DRIVER_ALSAMIDI_H #endif // ALSAMIDI_ENABLED + +#endif // MIDI_DRIVER_ALSAMIDI_H diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.h b/drivers/pulseaudio/audio_driver_pulseaudio.h index 15948fa763f..bc808cd85e6 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.h +++ b/drivers/pulseaudio/audio_driver_pulseaudio.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef PULSEAUDIO_ENABLED - #ifndef AUDIO_DRIVER_PULSEAUDIO_H #define AUDIO_DRIVER_PULSEAUDIO_H +#ifdef PULSEAUDIO_ENABLED + #include "core/os/mutex.h" #include "core/os/thread.h" #include "servers/audio_server.h" @@ -125,6 +125,6 @@ public: ~AudioDriverPulseAudio(); }; -#endif // AUDIO_DRIVER_PULSEAUDIO_H - #endif // PULSEAUDIO_ENABLED + +#endif // AUDIO_DRIVER_PULSEAUDIO_H diff --git a/modules/cvtt/register_types.h b/modules/cvtt/register_types.h index 8472980c6ab..36b5e332d6b 100644 --- a/modules/cvtt/register_types.h +++ b/modules/cvtt/register_types.h @@ -28,14 +28,14 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef TOOLS_ENABLED - #ifndef CVTT_REGISTER_TYPES_H #define CVTT_REGISTER_TYPES_H +#ifdef TOOLS_ENABLED + void register_cvtt_types(); void unregister_cvtt_types(); -#endif // CVTT_REGISTER_TYPES_H - #endif // TOOLS_ENABLED + +#endif // CVTT_REGISTER_TYPES_H diff --git a/modules/webrtc/webrtc_data_channel_gdnative.h b/modules/webrtc/webrtc_data_channel_gdnative.h index be3ea13028c..002ffb34c27 100644 --- a/modules/webrtc/webrtc_data_channel_gdnative.h +++ b/modules/webrtc/webrtc_data_channel_gdnative.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef WEBRTC_GDNATIVE_ENABLED - #ifndef WEBRTC_DATA_CHANNEL_GDNATIVE_H #define WEBRTC_DATA_CHANNEL_GDNATIVE_H +#ifdef WEBRTC_GDNATIVE_ENABLED + #include "modules/gdnative/include/net/godot_net.h" #include "webrtc_data_channel.h" @@ -75,6 +75,6 @@ public: ~WebRTCDataChannelGDNative(); }; -#endif // WEBRTC_DATA_CHANNEL_GDNATIVE_H - #endif // WEBRTC_GDNATIVE_ENABLED + +#endif // WEBRTC_DATA_CHANNEL_GDNATIVE_H diff --git a/modules/webrtc/webrtc_peer_connection_gdnative.h b/modules/webrtc/webrtc_peer_connection_gdnative.h index 8e59ad62ba8..2ecb005a495 100644 --- a/modules/webrtc/webrtc_peer_connection_gdnative.h +++ b/modules/webrtc/webrtc_peer_connection_gdnative.h @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifdef WEBRTC_GDNATIVE_ENABLED - #ifndef WEBRTC_PEER_CONNECTION_GDNATIVE_H #define WEBRTC_PEER_CONNECTION_GDNATIVE_H +#ifdef WEBRTC_GDNATIVE_ENABLED + #include "modules/gdnative/include/net/godot_net.h" #include "webrtc_peer_connection.h" @@ -68,6 +68,6 @@ public: ~WebRTCPeerConnectionGDNative(); }; -#endif // WEBRTC_PEER_CONNECTION_GDNATIVE_H - #endif // WEBRTC_GDNATIVE_ENABLED + +#endif // WEBRTC_PEER_CONNECTION_GDNATIVE_H