From 277b24dfb7acdb42589b931252bbe7be81c7536e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 11 Sep 2018 18:13:45 +0200 Subject: Make core/ includes absolute, remove subfolders from include path This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes. --- core/os/copymem.h | 2 +- core/os/dir_access.cpp | 9 +++++---- core/os/dir_access.h | 4 ++-- core/os/file_access.cpp | 4 ++-- core/os/file_access.h | 9 +++++---- core/os/input.cpp | 8 +++++--- core/os/input.h | 6 +++--- core/os/input_event.cpp | 4 ++-- core/os/input_event.h | 11 ++++++----- core/os/keyboard.cpp | 3 ++- core/os/keyboard.h | 7 ++----- core/os/main_loop.cpp | 3 ++- core/os/main_loop.h | 8 +++++--- core/os/memory.cpp | 6 ++++-- core/os/memory.h | 3 ++- core/os/midi_driver.cpp | 2 +- core/os/midi_driver.h | 3 ++- core/os/mutex.cpp | 4 +++- core/os/mutex.h | 2 +- core/os/os.cpp | 12 ++++++------ core/os/os.h | 15 ++++++++------- core/os/rw_lock.cpp | 2 +- core/os/rw_lock.h | 2 +- core/os/semaphore.cpp | 3 ++- core/os/semaphore.h | 3 ++- core/os/shell.h | 4 ++-- core/os/thread.h | 6 +++--- core/os/thread_dummy.cpp | 2 +- core/os/thread_dummy.h | 8 ++++---- core/os/thread_safe.cpp | 5 +++-- core/os/thread_safe.h | 2 +- core/os/threaded_array_processor.h | 10 +++++----- 32 files changed, 94 insertions(+), 78 deletions(-) (limited to 'core/os') diff --git a/core/os/copymem.h b/core/os/copymem.h index 87d77bd426..999c770e85 100644 --- a/core/os/copymem.h +++ b/core/os/copymem.h @@ -31,7 +31,7 @@ #ifndef COPYMEM_H #define COPYMEM_H -#include "typedefs.h" +#include "core/typedefs.h" #ifdef PLATFORM_COPYMEM diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index e631d6e994..dbd62cb3bb 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -29,10 +29,11 @@ /*************************************************************************/ #include "dir_access.h" -#include "os/file_access.h" -#include "os/memory.h" -#include "os/os.h" -#include "project_settings.h" + +#include "core/os/file_access.h" +#include "core/os/memory.h" +#include "core/os/os.h" +#include "core/project_settings.h" String DirAccess::_get_root_path() const { diff --git a/core/os/dir_access.h b/core/os/dir_access.h index 4df0618021..6b391a87fa 100644 --- a/core/os/dir_access.h +++ b/core/os/dir_access.h @@ -31,8 +31,8 @@ #ifndef DIR_ACCESS_H #define DIR_ACCESS_H -#include "typedefs.h" -#include "ustring.h" +#include "core/typedefs.h" +#include "core/ustring.h" /** @author Juan Linietsky diff --git a/core/os/file_access.cpp b/core/os/file_access.cpp index 59f07c03e7..224dea3343 100644 --- a/core/os/file_access.cpp +++ b/core/os/file_access.cpp @@ -32,8 +32,8 @@ #include "core/io/file_access_pack.h" #include "core/io/marshalls.h" -#include "os/os.h" -#include "project_settings.h" +#include "core/os/os.h" +#include "core/project_settings.h" #include "thirdparty/misc/md5.h" #include "thirdparty/misc/sha256.h" diff --git a/core/os/file_access.h b/core/os/file_access.h index c4635fdfbb..b7d93e9f5d 100644 --- a/core/os/file_access.h +++ b/core/os/file_access.h @@ -31,10 +31,11 @@ #ifndef FILE_ACCESS_H #define FILE_ACCESS_H -#include "math_defs.h" -#include "os/memory.h" -#include "typedefs.h" -#include "ustring.h" +#include "core/math/math_defs.h" +#include "core/os/memory.h" +#include "core/typedefs.h" +#include "core/ustring.h" + /** * Multi-Platform abstraction for accessing to files. */ diff --git a/core/os/input.cpp b/core/os/input.cpp index a5b0f91e63..6830df7e81 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -29,9 +29,11 @@ /*************************************************************************/ #include "input.h" -#include "input_map.h" -#include "os/os.h" -#include "project_settings.h" + +#include "core/input_map.h" +#include "core/os/os.h" +#include "core/project_settings.h" + Input *Input::singleton = NULL; Input *Input::get_singleton() { diff --git a/core/os/input.h b/core/os/input.h index 001871c5dc..db523d6789 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -31,9 +31,9 @@ #ifndef INPUT_H #define INPUT_H -#include "object.h" -#include "os/main_loop.h" -#include "os/thread_safe.h" +#include "core/object.h" +#include "core/os/main_loop.h" +#include "core/os/thread_safe.h" class Input : public Object { diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 12c6ef7d3b..cc359ef2ac 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -30,8 +30,8 @@ #include "input_event.h" -#include "input_map.h" -#include "os/keyboard.h" +#include "core/input_map.h" +#include "core/os/keyboard.h" void InputEvent::set_device(int p_device) { device = p_device; diff --git a/core/os/input_event.h b/core/os/input_event.h index 8732c7e377..cb61e61e7c 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -31,11 +31,12 @@ #ifndef INPUT_EVENT_H #define INPUT_EVENT_H -#include "os/copymem.h" -#include "resource.h" -#include "transform_2d.h" -#include "typedefs.h" -#include "ustring.h" +#include "core/math/transform_2d.h" +#include "core/os/copymem.h" +#include "core/resource.h" +#include "core/typedefs.h" +#include "core/ustring.h" + /** @author Juan Linietsky */ diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp index 9dfc91e308..abc579c58d 100644 --- a/core/os/keyboard.cpp +++ b/core/os/keyboard.cpp @@ -29,7 +29,8 @@ /*************************************************************************/ #include "keyboard.h" -#include "os/os.h" + +#include "core/os/os.h" struct _KeyCodeText { int code; diff --git a/core/os/keyboard.h b/core/os/keyboard.h index a0e6f8b2ef..17bf5eaa48 100644 --- a/core/os/keyboard.h +++ b/core/os/keyboard.h @@ -31,13 +31,10 @@ #ifndef KEYBOARD_H #define KEYBOARD_H -#include "ustring.h" -/** - @author Juan Linietsky -*/ +#include "core/ustring.h" /** -@author Juan Linietsky + @author Juan Linietsky */ /* diff --git a/core/os/main_loop.cpp b/core/os/main_loop.cpp index 6dba77ec9a..0945cdd512 100644 --- a/core/os/main_loop.cpp +++ b/core/os/main_loop.cpp @@ -29,7 +29,8 @@ /*************************************************************************/ #include "main_loop.h" -#include "script_language.h" + +#include "core/script_language.h" void MainLoop::_bind_methods() { diff --git a/core/os/main_loop.h b/core/os/main_loop.h index f96e46141e..43f74302a8 100644 --- a/core/os/main_loop.h +++ b/core/os/main_loop.h @@ -31,12 +31,14 @@ #ifndef MAIN_LOOP_H #define MAIN_LOOP_H -#include "os/input_event.h" -#include "reference.h" -#include "script_language.h" +#include "core/os/input_event.h" +#include "core/reference.h" +#include "core/script_language.h" + /** @author Juan Linietsky */ + class MainLoop : public Object { GDCLASS(MainLoop, Object); diff --git a/core/os/memory.cpp b/core/os/memory.cpp index 3eab4343a9..041371a6e2 100644 --- a/core/os/memory.cpp +++ b/core/os/memory.cpp @@ -29,9 +29,11 @@ /*************************************************************************/ #include "memory.h" -#include "copymem.h" + +#include "core/error_macros.h" +#include "core/os/copymem.h" #include "core/safe_refcount.h" -#include "error_macros.h" + #include #include diff --git a/core/os/memory.h b/core/os/memory.h index f5c6c0b38a..3501c3f14e 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -31,7 +31,8 @@ #ifndef MEMORY_H #define MEMORY_H -#include "safe_refcount.h" +#include "core/safe_refcount.h" + #include /** diff --git a/core/os/midi_driver.cpp b/core/os/midi_driver.cpp index 7b4f84473c..2b20a708ed 100644 --- a/core/os/midi_driver.cpp +++ b/core/os/midi_driver.cpp @@ -30,8 +30,8 @@ #include "midi_driver.h" +#include "core/os/os.h" #include "main/input_default.h" -#include "os/os.h" MIDIDriver *MIDIDriver::singleton = NULL; MIDIDriver *MIDIDriver::get_singleton() { diff --git a/core/os/midi_driver.h b/core/os/midi_driver.h index 1a3a67a411..ceb4e71d66 100644 --- a/core/os/midi_driver.h +++ b/core/os/midi_driver.h @@ -31,8 +31,9 @@ #ifndef MIDI_DRIVER_H #define MIDI_DRIVER_H +#include "core/typedefs.h" #include "core/variant.h" -#include "typedefs.h" + /** * Multi-Platform abstraction for accessing to MIDI. */ diff --git a/core/os/mutex.cpp b/core/os/mutex.cpp index 7c4ea2323c..0c01b06bd6 100644 --- a/core/os/mutex.cpp +++ b/core/os/mutex.cpp @@ -29,7 +29,9 @@ /*************************************************************************/ #include "mutex.h" -#include "error_macros.h" + +#include "core/error_macros.h" + #include Mutex *(*Mutex::create_func)(bool) = 0; diff --git a/core/os/mutex.h b/core/os/mutex.h index 9debe7f41b..788cc00397 100644 --- a/core/os/mutex.h +++ b/core/os/mutex.h @@ -31,7 +31,7 @@ #ifndef MUTEX_H #define MUTEX_H -#include "error_list.h" +#include "core/error_list.h" /** * @class Mutex diff --git a/core/os/os.cpp b/core/os/os.cpp index 0e6251a4fb..7547b6a042 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -30,13 +30,13 @@ #include "os.h" -#include "dir_access.h" -#include "input.h" -#include "os/file_access.h" -#include "os/midi_driver.h" -#include "project_settings.h" +#include "core/os/dir_access.h" +#include "core/os/file_access.h" +#include "core/os/input.h" +#include "core/os/midi_driver.h" +#include "core/project_settings.h" +#include "core/version_generated.gen.h" #include "servers/audio_server.h" -#include "version_generated.gen.h" #include diff --git a/core/os/os.h b/core/os/os.h index 100af95ef1..8fb5b45f67 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -31,13 +31,14 @@ #ifndef OS_H #define OS_H -#include "engine.h" -#include "image.h" -#include "io/logger.h" -#include "list.h" -#include "os/main_loop.h" -#include "ustring.h" -#include "vector.h" +#include "core/engine.h" +#include "core/image.h" +#include "core/io/logger.h" +#include "core/list.h" +#include "core/os/main_loop.h" +#include "core/ustring.h" +#include "core/vector.h" + #include /** diff --git a/core/os/rw_lock.cpp b/core/os/rw_lock.cpp index 35489490ed..5e51a1dbce 100644 --- a/core/os/rw_lock.cpp +++ b/core/os/rw_lock.cpp @@ -30,7 +30,7 @@ #include "rw_lock.h" -#include "error_macros.h" +#include "core/error_macros.h" #include diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h index 3e53300c9f..8d1029723b 100644 --- a/core/os/rw_lock.h +++ b/core/os/rw_lock.h @@ -31,7 +31,7 @@ #ifndef RWLOCK_H #define RWLOCK_H -#include "error_list.h" +#include "core/error_list.h" class RWLock { protected: diff --git a/core/os/semaphore.cpp b/core/os/semaphore.cpp index 0377aeeb29..448d17dd14 100644 --- a/core/os/semaphore.cpp +++ b/core/os/semaphore.cpp @@ -29,7 +29,8 @@ /*************************************************************************/ #include "semaphore.h" -#include "error_macros.h" + +#include "core/error_macros.h" Semaphore *(*Semaphore::create_func)() = 0; diff --git a/core/os/semaphore.h b/core/os/semaphore.h index f3021bf74c..6cec06ea28 100644 --- a/core/os/semaphore.h +++ b/core/os/semaphore.h @@ -31,11 +31,12 @@ #ifndef SEMAPHORE_H #define SEMAPHORE_H -#include "error_list.h" +#include "core/error_list.h" /** @author Juan Linietsky */ + class Semaphore { protected: static Semaphore *(*create_func)(); diff --git a/core/os/shell.h b/core/os/shell.h index d3d92028ea..146c35cbc8 100644 --- a/core/os/shell.h +++ b/core/os/shell.h @@ -31,8 +31,8 @@ #ifndef SHELL_H #define SHELL_H -#include "typedefs.h" -#include "ustring.h" +#include "core/typedefs.h" +#include "core/ustring.h" /** @author Juan Linietsky diff --git a/core/os/thread.h b/core/os/thread.h index c2947bccab..97e97652a5 100644 --- a/core/os/thread.h +++ b/core/os/thread.h @@ -31,13 +31,13 @@ #ifndef THREAD_H #define THREAD_H -#include "typedefs.h" +#include "core/typedefs.h" +#include "core/ustring.h" + /** @author Juan Linietsky */ -#include "ustring.h" - typedef void (*ThreadCreateCallback)(void *p_userdata); class Thread { diff --git a/core/os/thread_dummy.cpp b/core/os/thread_dummy.cpp index b6371235c4..9e0adf9994 100644 --- a/core/os/thread_dummy.cpp +++ b/core/os/thread_dummy.cpp @@ -30,7 +30,7 @@ #include "thread_dummy.h" -#include "memory.h" +#include "core/os/memory.h" Thread *ThreadDummy::create(ThreadCreateCallback p_callback, void *p_user, const Thread::Settings &p_settings) { return memnew(ThreadDummy); diff --git a/core/os/thread_dummy.h b/core/os/thread_dummy.h index 74957b95fe..6f46a4a20c 100644 --- a/core/os/thread_dummy.h +++ b/core/os/thread_dummy.h @@ -31,10 +31,10 @@ #ifndef THREAD_DUMMY_H #define THREAD_DUMMY_H -#include "mutex.h" -#include "rw_lock.h" -#include "semaphore.h" -#include "thread.h" +#include "core/os/mutex.h" +#include "core/os/rw_lock.h" +#include "core/os/semaphore.h" +#include "core/os/thread.h" class ThreadDummy : public Thread { diff --git a/core/os/thread_safe.cpp b/core/os/thread_safe.cpp index acb37df02b..3fe039e1b6 100644 --- a/core/os/thread_safe.cpp +++ b/core/os/thread_safe.cpp @@ -29,8 +29,9 @@ /*************************************************************************/ #include "thread_safe.h" -#include "error_macros.h" -#include "os/memory.h" + +#include "core/error_macros.h" +#include "core/os/memory.h" ThreadSafe::ThreadSafe() { diff --git a/core/os/thread_safe.h b/core/os/thread_safe.h index f0876f38a1..a17ceeed1d 100644 --- a/core/os/thread_safe.h +++ b/core/os/thread_safe.h @@ -31,7 +31,7 @@ #ifndef THREAD_SAFE_H #define THREAD_SAFE_H -#include "os/mutex.h" +#include "core/os/mutex.h" class ThreadSafe { diff --git a/core/os/threaded_array_processor.h b/core/os/threaded_array_processor.h index 3ff7db2a44..89c3b7cec3 100644 --- a/core/os/threaded_array_processor.h +++ b/core/os/threaded_array_processor.h @@ -31,11 +31,11 @@ #ifndef THREADED_ARRAY_PROCESSOR_H #define THREADED_ARRAY_PROCESSOR_H -#include "os/mutex.h" -#include "os/os.h" -#include "os/thread.h" -#include "safe_refcount.h" -#include "thread_safe.h" +#include "core/os/mutex.h" +#include "core/os/os.h" +#include "core/os/thread.h" +#include "core/os/thread_safe.h" +#include "core/safe_refcount.h" template struct ThreadArrayProcessData { -- cgit v1.2.3