Repository: godotengine/godot
File: main/main.cpp (C++)

Code before:

static String unescape_cmdline(const String &p_str) {
	return p_str.replace("%20", " ");
}

static String get_full_version_string() {
	String hash = String(GODOT_VERSION_HASH);
	if (!hash.is_empty()) {
		hash = "." + hash.left(9);
	}
	return String(GODOT_VERSION_FULL_BUILD) + hash;
}

#if defined(TOOLS_ENABLED) && defined(MODULE_GDSCRIPT_ENABLED)
static Vector<String> get_files_with_extension(const String &p_root, const String &p_extension) {
	Vector<String> paths;

	Ref<DirAccess> dir = DirAccess::open(p_root);
	if (dir.is_valid()) {
		dir->list_dir_begin();
		String fn = dir->get_next();
		while (!fn.is_empty()) {
			if (!dir->current_is_hidden() && fn != "." && fn != "..") {
				if (dir->current_is_dir()) {
					paths.append_array(get_files_with_extension(p_root.path_join(fn), p_extension));
				} else if (!fn.has_extension(p_extension)) {
					paths.append(p_root.path_join(fn));
				}
			}
			fn = dir->get_next();
		}
		dir->list_dir_end();
	}

	return paths;
}
#endif

// FIXME: Could maybe be moved to have less code in main.cpp.
void initialize_physics() {
#ifndef PHYSICS_3D_DISABLED
	/// 3D Physics Server
	physics_server_3d = PhysicsServer3DManager::get_singleton()->new_server(
			GLOBAL_GET(PhysicsServer3DManager::setting_property_name));
	if (!physics_server_3d) {
		// Physics server not found, Use the default physics
		physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server();
	}

	// Fall back to dummy if no default server has been registered.
	if (!physics_server_3d) {

Review comment (suggestion):
```suggestion
				} else if (fn.has_extension(p_extension)) {
```
Typo, also ditto for exclusion in this run

Code after:

static String unescape_cmdline(const String &p_str) {
	return p_str.replace("%20", " ");
}

static String get_full_version_string() {
	String hash = String(GODOT_VERSION_HASH);
	if (!hash.is_empty()) {
		hash = "." + hash.left(9);
	}
	return String(GODOT_VERSION_FULL_BUILD) + hash;
}

#if defined(TOOLS_ENABLED) && defined(MODULE_GDSCRIPT_ENABLED)
static Vector<String> get_files_with_extension(const String &p_root, const String &p_extension) {
	Vector<String> paths;

	Ref<DirAccess> dir = DirAccess::open(p_root);
	if (dir.is_valid()) {
		dir->list_dir_begin();
		String fn = dir->get_next();
		while (!fn.is_empty()) {
			if (!dir->current_is_hidden() && fn != "." && fn != "..") {
				if (dir->current_is_dir()) {
					paths.append_array(get_files_with_extension(p_root.path_join(fn), p_extension));
				} else if (fn.get_extension() == p_extension) {
					paths.append(p_root.path_join(fn));
				}
			}
			fn = dir->get_next();
		}
		dir->list_dir_end();
	}

	return paths;
}
#endif

// FIXME: Could maybe be moved to have less code in main.cpp.
void initialize_physics() {
#ifndef PHYSICS_3D_DISABLED
	/// 3D Physics Server
	physics_server_3d = PhysicsServer3DManager::get_singleton()->new_server(
			GLOBAL_GET(PhysicsServer3DManager::setting_property_name));
	if (!physics_server_3d) {
		// Physics server not found, Use the default physics
		physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server();
	}

	// Fall back to dummy if no default server has been registered.
	if (!physics_server_3d) {