From 75dae1b9a9db8f29f53cadce6ebbccf8698939b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 12 Feb 2019 14:23:35 +0100 Subject: [PATCH] Drivers, main, servers: Ensure classes match their header filename Renamed: - `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h` (same for `coremidi` and `winmidi`) - `main/timer_sync.h` -> `main_timer_sync.h` - `servers/visual/visual_server_global.h` -> `visual_server_globals.h` --- .../{alsa_midi.cpp => midi_driver_alsamidi.cpp} | 6 +++--- .../alsamidi/{alsa_midi.h => midi_driver_alsamidi.h} | 10 +++++----- .../{core_midi.cpp => midi_driver_coremidi.cpp} | 6 +++--- .../coremidi/{core_midi.h => midi_driver_coremidi.h} | 10 +++++----- .../winmidi/{win_midi.cpp => midi_driver_winmidi.cpp} | 6 +++--- drivers/winmidi/{win_midi.h => midi_driver_winmidi.h} | 10 +++++----- main/main.cpp | 2 +- main/{timer_sync.cpp => main_timer_sync.cpp} | 4 ++-- main/{timer_sync.h => main_timer_sync.h} | 8 ++++---- modules/gdnative/arvr/arvr_interface_gdnative.cpp | 2 +- modules/mobile_vr/mobile_vr_interface.cpp | 2 +- platform/osx/os_osx.h | 2 +- platform/windows/os_windows.h | 9 +++++---- platform/x11/os_x11.h | 2 +- servers/visual/visual_server_canvas.cpp | 2 +- ...ual_server_global.cpp => visual_server_globals.cpp} | 4 ++-- ...{visual_server_global.h => visual_server_globals.h} | 8 ++++---- servers/visual/visual_server_raster.cpp | 2 +- servers/visual/visual_server_raster.h | 2 +- servers/visual/visual_server_scene.cpp | 2 +- servers/visual/visual_server_viewport.cpp | 2 +- 21 files changed, 51 insertions(+), 50 deletions(-) rename drivers/alsamidi/{alsa_midi.cpp => midi_driver_alsamidi.cpp} (97%) rename drivers/alsamidi/{alsa_midi.h => midi_driver_alsamidi.h} (93%) rename drivers/coremidi/{core_midi.cpp => midi_driver_coremidi.cpp} (97%) rename drivers/coremidi/{core_midi.h => midi_driver_coremidi.h} (93%) rename drivers/winmidi/{win_midi.cpp => midi_driver_winmidi.cpp} (96%) rename drivers/winmidi/{win_midi.h => midi_driver_winmidi.h} (93%) rename main/{timer_sync.cpp => main_timer_sync.cpp} (98%) rename main/{timer_sync.h => main_timer_sync.h} (96%) rename servers/visual/{visual_server_global.cpp => visual_server_globals.cpp} (96%) rename servers/visual/{visual_server_global.h => visual_server_globals.h} (94%) diff --git a/drivers/alsamidi/alsa_midi.cpp b/drivers/alsamidi/midi_driver_alsamidi.cpp similarity index 97% rename from drivers/alsamidi/alsa_midi.cpp rename to drivers/alsamidi/midi_driver_alsamidi.cpp index cd90c8912b2..aae0ae02165 100644 --- a/drivers/alsamidi/alsa_midi.cpp +++ b/drivers/alsamidi/midi_driver_alsamidi.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* alsa_midi.cpp */ +/* midi_driver_alsamidi.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,7 +30,7 @@ #ifdef ALSAMIDI_ENABLED -#include "alsa_midi.h" +#include "midi_driver_alsamidi.h" #include "core/os/os.h" #include "core/print_string.h" @@ -199,4 +199,4 @@ MIDIDriverALSAMidi::~MIDIDriverALSAMidi() { close(); } -#endif +#endif // ALSAMIDI_ENABLED diff --git a/drivers/alsamidi/alsa_midi.h b/drivers/alsamidi/midi_driver_alsamidi.h similarity index 93% rename from drivers/alsamidi/alsa_midi.h rename to drivers/alsamidi/midi_driver_alsamidi.h index 054a7b474e0..b6956cc32fe 100644 --- a/drivers/alsamidi/alsa_midi.h +++ b/drivers/alsamidi/midi_driver_alsamidi.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* alsa_midi.h */ +/* midi_driver_alsamidi.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,8 +30,8 @@ #ifdef ALSAMIDI_ENABLED -#ifndef ALSA_MIDI_H -#define ALSA_MIDI_H +#ifndef MIDI_DRIVER_ALSAMIDI_H +#define MIDI_DRIVER_ALSAMIDI_H #include "core/os/midi_driver.h" #include "core/os/mutex.h" @@ -65,5 +65,5 @@ public: virtual ~MIDIDriverALSAMidi(); }; -#endif -#endif +#endif // MIDI_DRIVER_ALSAMIDI_H +#endif // ALSAMIDI_ENABLED diff --git a/drivers/coremidi/core_midi.cpp b/drivers/coremidi/midi_driver_coremidi.cpp similarity index 97% rename from drivers/coremidi/core_midi.cpp rename to drivers/coremidi/midi_driver_coremidi.cpp index 7d3477213f3..7a92ac0702c 100644 --- a/drivers/coremidi/core_midi.cpp +++ b/drivers/coremidi/midi_driver_coremidi.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* core_midi.cpp */ +/* midi_driver_coremidi.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,7 +30,7 @@ #ifdef COREMIDI_ENABLED -#include "core_midi.h" +#include "midi_driver_coremidi.h" #include "core/print_string.h" @@ -120,4 +120,4 @@ MIDIDriverCoreMidi::~MIDIDriverCoreMidi() { close(); } -#endif +#endif // COREMIDI_ENABLED diff --git a/drivers/coremidi/core_midi.h b/drivers/coremidi/midi_driver_coremidi.h similarity index 93% rename from drivers/coremidi/core_midi.h rename to drivers/coremidi/midi_driver_coremidi.h index 7a10b5548ea..23c2a19812e 100644 --- a/drivers/coremidi/core_midi.h +++ b/drivers/coremidi/midi_driver_coremidi.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* core_midi.h */ +/* midi_driver_coremidi.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,8 +30,8 @@ #ifdef COREMIDI_ENABLED -#ifndef CORE_MIDI_H -#define CORE_MIDI_H +#ifndef MIDI_DRIVER_COREMIDI_H +#define MIDI_DRIVER_COREMIDI_H #include "core/os/midi_driver.h" #include "core/vector.h" @@ -58,5 +58,5 @@ public: virtual ~MIDIDriverCoreMidi(); }; -#endif -#endif +#endif // MIDI_DRIVER_COREMIDI_H +#endif // COREMIDI_ENABLED diff --git a/drivers/winmidi/win_midi.cpp b/drivers/winmidi/midi_driver_winmidi.cpp similarity index 96% rename from drivers/winmidi/win_midi.cpp rename to drivers/winmidi/midi_driver_winmidi.cpp index 26bba346614..65676b629af 100644 --- a/drivers/winmidi/win_midi.cpp +++ b/drivers/winmidi/midi_driver_winmidi.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* win_midi.cpp */ +/* midi_driver_winmidi.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,7 +30,7 @@ #ifdef WINMIDI_ENABLED -#include "win_midi.h" +#include "midi_driver_winmidi.h" #include "core/print_string.h" @@ -104,4 +104,4 @@ MIDIDriverWinMidi::~MIDIDriverWinMidi() { close(); } -#endif +#endif // WINMIDI_ENABLED diff --git a/drivers/winmidi/win_midi.h b/drivers/winmidi/midi_driver_winmidi.h similarity index 93% rename from drivers/winmidi/win_midi.h rename to drivers/winmidi/midi_driver_winmidi.h index 4341f7ca7e4..2eaa70ef8dd 100644 --- a/drivers/winmidi/win_midi.h +++ b/drivers/winmidi/midi_driver_winmidi.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* win_midi.h */ +/* midi_driver_winmidi.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -30,8 +30,8 @@ #ifdef WINMIDI_ENABLED -#ifndef WIN_MIDI_H -#define WIN_MIDI_H +#ifndef MIDI_DRIVER_WINMIDI_H +#define MIDI_DRIVER_WINMIDI_H #include "core/os/midi_driver.h" #include "core/vector.h" @@ -57,5 +57,5 @@ public: virtual ~MIDIDriverWinMidi(); }; -#endif -#endif +#endif // MIDI_DRIVER_WINMIDI_H +#endif // WINMIDI_ENABLED diff --git a/main/main.cpp b/main/main.cpp index f9044b61cd6..5ccc6662e8c 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -53,11 +53,11 @@ #include "drivers/register_driver_types.h" #include "main/app_icon.gen.h" #include "main/input_default.h" +#include "main/main_timer_sync.h" #include "main/performance.h" #include "main/splash.gen.h" #include "main/splash_editor.gen.h" #include "main/tests/test_main.h" -#include "main/timer_sync.h" #include "modules/register_module_types.h" #include "platform/register_platform_apis.h" #include "scene/main/scene_tree.h" diff --git a/main/timer_sync.cpp b/main/main_timer_sync.cpp similarity index 98% rename from main/timer_sync.cpp rename to main/main_timer_sync.cpp index 5ee834880f2..f7388c85178 100644 --- a/main/timer_sync.cpp +++ b/main/main_timer_sync.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* timer_sync.cpp */ +/* main_timer_sync.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "timer_sync.h" +#include "main_timer_sync.h" void MainFrameTime::clamp_idle(float min_idle_step, float max_idle_step) { if (idle_step < min_idle_step) { diff --git a/main/timer_sync.h b/main/main_timer_sync.h similarity index 96% rename from main/timer_sync.h rename to main/main_timer_sync.h index fcce6d7a9aa..179119edce1 100644 --- a/main/timer_sync.h +++ b/main/main_timer_sync.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* timer_sync.h */ +/* main_timer_sync.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef TIMER_SYNC_H -#define TIMER_SYNC_H +#ifndef MAIN_TIMER_SYNC_H +#define MAIN_TIMER_SYNC_H #include "core/engine.h" @@ -98,4 +98,4 @@ public: MainFrameTime advance(float p_frame_slice, int p_iterations_per_second); }; -#endif // TIMER_SYNC_H +#endif // MAIN_TIMER_SYNC_H diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 01fbc316cf4..11509fc20a0 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -31,7 +31,7 @@ #include "arvr_interface_gdnative.h" #include "main/input_default.h" #include "servers/arvr/arvr_positional_tracker.h" -#include "servers/visual/visual_server_global.h" +#include "servers/visual/visual_server_globals.h" ARVRInterfaceGDNative::ARVRInterfaceGDNative() { // testing diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp index 78cc6677180..b4fbd417d79 100644 --- a/modules/mobile_vr/mobile_vr_interface.cpp +++ b/modules/mobile_vr/mobile_vr_interface.cpp @@ -31,7 +31,7 @@ #include "mobile_vr_interface.h" #include "core/os/input.h" #include "core/os/os.h" -#include "servers/visual/visual_server_global.h" +#include "servers/visual/visual_server_globals.h" StringName MobileVRInterface::get_name() const { return "Native mobile"; diff --git a/platform/osx/os_osx.h b/platform/osx/os_osx.h index 927c8c9b008..32199e0adb9 100644 --- a/platform/osx/os_osx.h +++ b/platform/osx/os_osx.h @@ -34,7 +34,7 @@ #include "core/os/input.h" #include "crash_handler_osx.h" #include "drivers/coreaudio/audio_driver_coreaudio.h" -#include "drivers/coremidi/core_midi.h" +#include "drivers/coremidi/midi_driver_coremidi.h" #include "drivers/unix/os_unix.h" #include "joypad_osx.h" #include "main/input_default.h" diff --git a/platform/windows/os_windows.h b/platform/windows/os_windows.h index 771789c86b1..ba84c2098e3 100644 --- a/platform/windows/os_windows.h +++ b/platform/windows/os_windows.h @@ -30,14 +30,18 @@ #ifndef OS_WINDOWS_H #define OS_WINDOWS_H + #include "context_gl_win.h" #include "core/os/input.h" #include "core/os/os.h" #include "core/project_settings.h" #include "crash_handler_win.h" #include "drivers/rtaudio/audio_driver_rtaudio.h" +#include "drivers/unix/ip_unix.h" #include "drivers/wasapi/audio_driver_wasapi.h" -#include "drivers/winmidi/win_midi.h" +#include "drivers/winmidi/midi_driver_winmidi.h" +#include "key_mapping_win.h" +#include "main/input_default.h" #include "power_windows.h" #include "servers/audio_server.h" #include "servers/visual/rasterizer.h" @@ -45,9 +49,6 @@ #ifdef XAUDIO2_ENABLED #include "drivers/xaudio2/audio_driver_xaudio2.h" #endif -#include "drivers/unix/ip_unix.h" -#include "key_mapping_win.h" -#include "main/input_default.h" #include #include diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h index cf1619bae26..6d1a66af84e 100644 --- a/platform/x11/os_x11.h +++ b/platform/x11/os_x11.h @@ -35,7 +35,7 @@ #include "core/os/input.h" #include "crash_handler_x11.h" #include "drivers/alsa/audio_driver_alsa.h" -#include "drivers/alsamidi/alsa_midi.h" +#include "drivers/alsamidi/midi_driver_alsamidi.h" #include "drivers/pulseaudio/audio_driver_pulseaudio.h" #include "drivers/unix/os_unix.h" #include "joypad_linux.h" diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index bb020274795..e1ecba63346 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "visual_server_canvas.h" -#include "visual_server_global.h" +#include "visual_server_globals.h" #include "visual_server_raster.h" #include "visual_server_viewport.h" diff --git a/servers/visual/visual_server_global.cpp b/servers/visual/visual_server_globals.cpp similarity index 96% rename from servers/visual/visual_server_global.cpp rename to servers/visual/visual_server_globals.cpp index 2d6d489759d..5c247c7f0f4 100644 --- a/servers/visual/visual_server_global.cpp +++ b/servers/visual/visual_server_globals.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* visual_server_global.cpp */ +/* visual_server_globals.cpp */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#include "visual_server_global.h" +#include "visual_server_globals.h" RasterizerStorage *VisualServerGlobals::storage = NULL; RasterizerCanvas *VisualServerGlobals::canvas_render = NULL; diff --git a/servers/visual/visual_server_global.h b/servers/visual/visual_server_globals.h similarity index 94% rename from servers/visual/visual_server_global.h rename to servers/visual/visual_server_globals.h index b510307e81c..04d52aa1eb3 100644 --- a/servers/visual/visual_server_global.h +++ b/servers/visual/visual_server_globals.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* visual_server_global.h */ +/* visual_server_globals.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef VISUALSERVERGLOBAL_H -#define VISUALSERVERGLOBAL_H +#ifndef VISUAL_SERVER_GLOBALS_H +#define VISUAL_SERVER_GLOBALS_H #include "rasterizer.h" @@ -51,4 +51,4 @@ public: #define VSG VisualServerGlobals -#endif // VISUALSERVERGLOBAL_H +#endif // VISUAL_SERVER_GLOBALS_H diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index b18fabd467b..6622433b17f 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -35,7 +35,7 @@ #include "core/project_settings.h" #include "core/sort_array.h" #include "visual_server_canvas.h" -#include "visual_server_global.h" +#include "visual_server_globals.h" #include "visual_server_scene.h" // careful, these may run in different threads than the visual server diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h index ec6e50753ed..89a759b9636 100644 --- a/servers/visual/visual_server_raster.h +++ b/servers/visual/visual_server_raster.h @@ -35,7 +35,7 @@ #include "servers/visual/rasterizer.h" #include "servers/visual_server.h" #include "visual_server_canvas.h" -#include "visual_server_global.h" +#include "visual_server_globals.h" #include "visual_server_scene.h" #include "visual_server_viewport.h" /** diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index c8d64fca457..5d0456686af 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -30,7 +30,7 @@ #include "visual_server_scene.h" #include "core/os/os.h" -#include "visual_server_global.h" +#include "visual_server_globals.h" #include "visual_server_raster.h" #include /* CAMERA API */ diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp index 7a7ae3a823e..d6e43b0f008 100644 --- a/servers/visual/visual_server_viewport.cpp +++ b/servers/visual/visual_server_viewport.cpp @@ -32,7 +32,7 @@ #include "core/project_settings.h" #include "visual_server_canvas.h" -#include "visual_server_global.h" +#include "visual_server_globals.h" #include "visual_server_scene.h" void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::Eyes p_eye) {