Resolving suggestions on comment formatting.

This commit is contained in:
Anish Bhobe 2022-02-20 14:56:58 +01:00 committed by GitHub
parent 102d9fc1b3
commit b7ff421b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,12 +40,12 @@ NativeExtensionManager::LoadStatus NativeExtensionManager::load_extension(const
return LOAD_STATUS_FAILED; return LOAD_STATUS_FAILED;
} }
if (level >= 0) { //already initialized up to some level if (level >= 0) { // Already initialized up to some level.
int32_t minimum_level = extension->get_minimum_library_initialization_level(); int32_t minimum_level = extension->get_minimum_library_initialization_level();
if (minimum_level < MIN(level, NativeExtension::INITIALIZATION_LEVEL_SCENE)) { if (minimum_level < MIN(level, NativeExtension::INITIALIZATION_LEVEL_SCENE)) {
return LOAD_STATUS_NEEDS_RESTART; return LOAD_STATUS_NEEDS_RESTART;
} }
//initialize up to current level // Initialize up to current level.
for (int32_t i = minimum_level; i <= level; i++) { for (int32_t i = minimum_level; i <= level; i++) {
extension->initialize_library(NativeExtension::InitializationLevel(i)); extension->initialize_library(NativeExtension::InitializationLevel(i));
} }
@ -64,12 +64,12 @@ NativeExtensionManager::LoadStatus NativeExtensionManager::unload_extension(cons
Ref<NativeExtension> extension = native_extension_map[p_path]; Ref<NativeExtension> extension = native_extension_map[p_path];
if (level >= 0) { //already initialized up to some level if (level >= 0) { // Already initialized up to some level.
int32_t minimum_level = extension->get_minimum_library_initialization_level(); int32_t minimum_level = extension->get_minimum_library_initialization_level();
if (minimum_level < MIN(level, NativeExtension::INITIALIZATION_LEVEL_SCENE)) { if (minimum_level < MIN(level, NativeExtension::INITIALIZATION_LEVEL_SCENE)) {
return LOAD_STATUS_NEEDS_RESTART; return LOAD_STATUS_NEEDS_RESTART;
} }
// deinitialize down to current level // Deinitialize down to current level.
for (int32_t i = level; i >= minimum_level; i--) { for (int32_t i = level; i >= minimum_level; i--) {
extension->deinitialize_library(NativeExtension::InitializationLevel(i)); extension->deinitialize_library(NativeExtension::InitializationLevel(i));
} }