mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add String::replace_char(s) methods for performance and convenience
This commit is contained in:
parent
c374ce211c
commit
889410dcda
67 changed files with 297 additions and 137 deletions
|
|
@ -1905,7 +1905,7 @@ Error BindingsGenerator::generate_cs_core_project(const String &p_proj_dir) {
|
|||
" <ItemGroup>\n");
|
||||
|
||||
for (int i = 0; i < compile_items.size(); i++) {
|
||||
String include = Path::relative_to(compile_items[i], p_proj_dir).replace("/", "\\");
|
||||
String include = Path::relative_to(compile_items[i], p_proj_dir).replace_char('/', '\\');
|
||||
includes_props_content.append(" <Compile Include=\"" + include + "\" />\n");
|
||||
}
|
||||
|
||||
|
|
@ -2065,7 +2065,7 @@ Error BindingsGenerator::generate_cs_editor_project(const String &p_proj_dir) {
|
|||
" <ItemGroup>\n");
|
||||
|
||||
for (int i = 0; i < compile_items.size(); i++) {
|
||||
String include = Path::relative_to(compile_items[i], p_proj_dir).replace("/", "\\");
|
||||
String include = Path::relative_to(compile_items[i], p_proj_dir).replace_char('/', '\\');
|
||||
includes_props_content.append(" <Compile Include=\"" + include + "\" />\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ bool get_dotnet_self_registered_dir(String &r_dotnet_root) {
|
|||
return false;
|
||||
}
|
||||
|
||||
r_dotnet_root = String::utf16((const char16_t *)buffer.ptr()).replace("\\", "/");
|
||||
r_dotnet_root = String::utf16((const char16_t *)buffer.ptr()).replace_char('\\', '/');
|
||||
RegCloseKey(hkey);
|
||||
return true;
|
||||
#else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue