diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-04 01:38:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-04 01:38:01 +0200 |
commit | c020eea184b84ec9193f2bec5265bd72f4e86d24 (patch) | |
tree | 3b1184fee57c0f0c038030808b8264021523024a /main | |
parent | 79b0a9ddfc41c5b9fe3bc903cab1001aefcedde2 (diff) | |
parent | 929b98d24b53789b3e3fbbae90aed0fe0e72b409 (diff) |
Merge pull request #40092 from hinlopen/remove-find-last
Remove String::find_last (same as rfind)
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/main.cpp b/main/main.cpp index 96b71c1663..608b4a7c4d 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -780,7 +780,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get().ends_with("project.godot")) { String path; String file = I->get(); - int sep = MAX(file.find_last("/"), file.find_last("\\")); + int sep = MAX(file.rfind("/"), file.rfind("\\")); if (sep == -1) { path = "."; } else { @@ -1992,7 +1992,7 @@ bool Main::start() { local_game_path = "res://" + local_game_path; } else { - int sep = local_game_path.find_last("/"); + int sep = local_game_path.rfind("/"); if (sep == -1) { DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); |