Skip to content

Commit fd9045f

Browse files
authored
Merge pull request #873 from Spartan322/merge/fd4c29a
Merge commit godotengine/godot@fd4c29a
2 parents 9767837 + cfc378b commit fd9045f

File tree

131 files changed

+1351
-787
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+1351
-787
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ compile_commands.json
3636
platform/windows/godot_res.res
3737

3838
# Ninja build files
39-
build.ninja
40-
.ninja
39+
*.ninja
40+
.ninja/
4141
run_ninja_env.bat
4242

4343
# Generated by Godot binary

SConstruct

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ if env["ninja"]:
10501050
SetOption("experimental", "ninja")
10511051
env["NINJA_FILE_NAME"] = env["ninja_file"]
10521052
env["NINJA_DISABLE_AUTO_RUN"] = not env["ninja_auto_run"]
1053-
env.Tool("ninja", "build.ninja")
1053+
env.Tool("ninja", env["ninja_file"])
10541054

10551055
# Threads
10561056
if env["threads"]:
@@ -1112,7 +1112,7 @@ atexit.register(print_elapsed_time)
11121112

11131113

11141114
def purge_flaky_files():
1115-
paths_to_keep = ["build.ninja"]
1115+
paths_to_keep = [env["ninja_file"]]
11161116
for build_failure in GetBuildFailures():
11171117
path = build_failure.node.path
11181118
if os.path.isfile(path) and path not in paths_to_keep:

core/config/project_settings.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ String ProjectSettings::localize_path(const String &p_path) const {
196196

197197
return cwd.replace_first(res_path, "res://");
198198
} else {
199-
int sep = path.rfind("/");
199+
int sep = path.rfind_char('/');
200200
if (sep == -1) {
201201
return "res://" + path;
202202
}
@@ -264,6 +264,12 @@ String ProjectSettings::globalize_path(const String &p_path) const {
264264
return p_path.replace("res:/", resource_path);
265265
}
266266
return p_path.replace("res://", "");
267+
} else if (p_path.begins_with("uid://")) {
268+
const String path = ResourceUID::uid_to_path(p_path);
269+
if (!resource_path.is_empty()) {
270+
return path.replace("res:/", resource_path);
271+
}
272+
return path.replace("res://", "");
267273
} else if (p_path.begins_with("user://")) {
268274
String data_dir = OS::get_singleton()->get_user_data_dir();
269275
if (!data_dir.is_empty()) {
@@ -302,7 +308,7 @@ bool ProjectSettings::_set(const StringName &p_name, const Variant &p_value) {
302308
}
303309

304310
{ // Feature overrides.
305-
int dot = p_name.operator String().find(".");
311+
int dot = p_name.operator String().find_char('.');
306312
if (dot != -1) {
307313
Vector<String> s = p_name.operator String().split(".");
308314

@@ -437,7 +443,7 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
437443

438444
for (const _VCSort &E : vclist) {
439445
String prop_info_name = E.name;
440-
int dot = prop_info_name.find(".");
446+
int dot = prop_info_name.find_char('.');
441447
if (dot != -1 && !custom_prop_info.has(prop_info_name)) {
442448
prop_info_name = prop_info_name.substr(0, dot);
443449
}
@@ -1094,7 +1100,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
10941100
String category = E.name;
10951101
String name = E.name;
10961102

1097-
int div = category.find("/");
1103+
int div = category.find_char('/');
10981104

10991105
if (div < 0) {
11001106
category = "";

core/debugger/engine_debugger.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, co
165165

166166
for (int i = 0; i < p_breakpoints.size(); i++) {
167167
const String &bp = p_breakpoints[i];
168-
int sp = bp.rfind(":");
168+
int sp = bp.rfind_char(':');
169169
ERR_CONTINUE_MSG(sp == -1, vformat("Invalid breakpoint: '%s', expected file:line format.", bp));
170170

171171
singleton_script_debugger->insert_breakpoint(bp.substr(sp + 1, bp.length()).to_int(), bp.substr(0, sp));

core/debugger/local_debugger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
173173

174174
} else {
175175
String key_value = line.get_slicec(' ', 1);
176-
int value_pos = key_value.find("=");
176+
int value_pos = key_value.find_char('=');
177177

178178
if (value_pos < 0) {
179179
print_line("Error: Invalid set format. Use: set key=value");
@@ -346,7 +346,7 @@ Pair<String, int> LocalDebugger::to_breakpoint(const String &p_line) {
346346
String breakpoint_part = p_line.get_slicec(' ', 1);
347347
Pair<String, int> breakpoint;
348348

349-
int last_colon = breakpoint_part.rfind(":");
349+
int last_colon = breakpoint_part.rfind_char(':');
350350
if (last_colon < 0) {
351351
print_line("Error: Invalid breakpoint format. Expected [source:line]");
352352
return breakpoint;

core/debugger/remote_debugger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ void RemoteDebugger::_send_stack_vars(List<String> &p_names, List<Variant> &p_va
340340
}
341341

342342
Error RemoteDebugger::_try_capture(const String &p_msg, const Array &p_data, bool &r_captured) {
343-
const int idx = p_msg.find(":");
343+
const int idx = p_msg.find_char(':');
344344
r_captured = false;
345345
if (idx < 0) { // No prefix, unknown message.
346346
return OK;
@@ -612,7 +612,7 @@ void RemoteDebugger::poll_events(bool p_is_idle) {
612612
ERR_CONTINUE(arr[1].get_type() != Variant::ARRAY);
613613

614614
const String cmd = arr[0];
615-
const int idx = cmd.find(":");
615+
const int idx = cmd.find_char(':');
616616
bool parsed = false;
617617
if (idx < 0) { // Not prefix, use scripts capture.
618618
capture_parse("core", cmd, arr[1], parsed);

core/debugger/remote_debugger_peer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ RemoteDebuggerPeer *RemoteDebuggerPeerTCP::create(const String &p_uri) {
226226
uint16_t debug_port = 6007;
227227

228228
if (debug_host.contains(":")) {
229-
int sep_pos = debug_host.rfind(":");
229+
int sep_pos = debug_host.rfind_char(':');
230230
debug_port = debug_host.substr(sep_pos + 1).to_int();
231231
debug_host = debug_host.substr(0, sep_pos);
232232
}

0 commit comments

Comments
 (0)