1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Use static initialization for Android class loader

This commit is contained in:
ζeh Matt
2023-06-27 23:09:53 +03:00
parent 60a2d5c1f6
commit 484523f82f
3 changed files with 1 additions and 16 deletions

View File

@@ -27,7 +27,7 @@ AndroidClassLoader::~AndroidClassLoader()
jobject AndroidClassLoader::_classLoader;
jmethodID AndroidClassLoader::_findClassMethod;
static std::shared_ptr<AndroidClassLoader> acl;
static std::shared_ptr<AndroidClassLoader> acl = std::make_shared<AndroidClassLoader>();
namespace Platform
{
@@ -173,11 +173,6 @@ namespace Platform
return displayScale;
}
void AndroidInitClassLoader()
{
acl = std::make_shared<AndroidClassLoader>();
}
jclass AndroidFindClass(JNIEnv* env, std::string_view name)
{
return static_cast<jclass>(env->CallObjectMethod(