Core: Handle disabled class detection in ClassDB

This commit is contained in:
Thaddeus Crews
2025-06-29 12:36:16 -05:00
parent 21fbf033f7
commit 555e7ad073
13 changed files with 62 additions and 52 deletions

View File

@ -41,7 +41,7 @@ void initialize_ktx_module(ModuleInitializationLevel p_level) {
return;
}
if (GD_IS_CLASS_ENABLED(ImageTexture)) {
if constexpr (GD_IS_CLASS_ENABLED(ImageTexture)) {
resource_loader_ktx.instantiate();
ResourceLoader::add_resource_format_loader(resource_loader_ktx);
}
@ -52,7 +52,7 @@ void uninitialize_ktx_module(ModuleInitializationLevel p_level) {
return;
}
if (GD_IS_CLASS_ENABLED(ImageTexture)) {
if constexpr (GD_IS_CLASS_ENABLED(ImageTexture)) {
ResourceLoader::remove_resource_format_loader(resource_loader_ktx);
resource_loader_ktx.unref();
}