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

@ -45,7 +45,7 @@ void initialize_dds_module(ModuleInitializationLevel p_level) {
Image::save_dds_func = save_dds;
Image::save_dds_buffer_func = save_dds_buffer;
if (GD_IS_CLASS_ENABLED(Texture)) {
if constexpr (GD_IS_CLASS_ENABLED(Texture)) {
resource_loader_dds.instantiate();
ResourceLoader::add_resource_format_loader(resource_loader_dds);
}
@ -56,7 +56,7 @@ void uninitialize_dds_module(ModuleInitializationLevel p_level) {
return;
}
if (GD_IS_CLASS_ENABLED(Texture)) {
if constexpr (GD_IS_CLASS_ENABLED(Texture)) {
ResourceLoader::remove_resource_format_loader(resource_loader_dds);
resource_loader_dds.unref();
}