summaryrefslogtreecommitdiffstats
path: root/platform/android/api
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-06-08 14:51:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-06-08 15:19:19 +0200
commit9e4315bb502659e73b01eb5b40ce1cac10bea2c5 (patch)
tree0ba5196ed22da7782480105116134421412ae10a /platform/android/api
parent2985a9ac348fc0e08a7906ff36b08985e36ac2a4 (diff)
downloadredot-engine-9e4315bb502659e73b01eb5b40ce1cac10bea2c5.tar.gz
Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module should be included with relative paths (relative to the root folder of the modular component, e.g. `platform/linuxbsd/`), in their own section before Godot's "core" includes. The `api` and `export` subfolders also need to be handled as self-contained (and thus use relative paths for their "local" includes) as they are all compiled for each editor platform, without necessarily having the api/export matching platform folder in the include path. E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp` and those need to use relative includes for it to work.
Diffstat (limited to 'platform/android/api')
-rw-r--r--platform/android/api/api.cpp3
-rw-r--r--platform/android/api/jni_singleton.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp
index 757ca315a7..60c369951c 100644
--- a/platform/android/api/api.cpp
+++ b/platform/android/api/api.cpp
@@ -30,10 +30,11 @@
#include "api.h"
-#include "core/config/engine.h"
#include "java_class_wrapper.h"
#include "jni_singleton.h"
+#include "core/config/engine.h"
+
#if !defined(ANDROID_ENABLED)
static JavaClassWrapper *java_class_wrapper = nullptr;
#endif
diff --git a/platform/android/api/jni_singleton.h b/platform/android/api/jni_singleton.h
index 455ed259ec..a2d1c08168 100644
--- a/platform/android/api/jni_singleton.h
+++ b/platform/android/api/jni_singleton.h
@@ -33,8 +33,9 @@
#include "core/config/engine.h"
#include "core/variant/variant.h"
+
#ifdef ANDROID_ENABLED
-#include "platform/android/jni_utils.h"
+#include "jni_utils.h"
#endif
class JNISingleton : public Object {