diff options
Diffstat (limited to 'main/main.cpp')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp index 8b58641461..246802ad38 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -827,7 +827,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph if (I->next()) { String vm = I->next()->get(); - if (vm.find("x") == -1) { // invalid parameter format + if (!vm.contains("x")) { // invalid parameter format OS::get_singleton()->print("Invalid resolution '%s', it should be e.g. '1280x720'.\n", vm.utf8().get_data()); @@ -858,7 +858,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph if (I->next()) { String vm = I->next()->get(); - if (vm.find(",") == -1) { // invalid parameter format + if (!vm.contains(",")) { // invalid parameter format OS::get_singleton()->print("Invalid position '%s', it should be e.g. '80,128'.\n", vm.utf8().get_data()); @@ -940,7 +940,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get() == "--debug-server") { if (I->next()) { debug_server_uri = I->next()->get(); - if (debug_server_uri.find("://") == -1) { // wrong address + if (!debug_server_uri.contains("://")) { // wrong address OS::get_singleton()->print("Invalid debug server uri. It should be of the form <protocol>://<bind_address>:<port>.\n"); goto error; } @@ -1073,7 +1073,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph } else if (I->get() == "--remote-debug") { if (I->next()) { debug_uri = I->next()->get(); - if (debug_uri.find("://") == -1) { // wrong address + if (!debug_uri.contains("://")) { // wrong address OS::get_singleton()->print( "Invalid debug host address, it should be of the form <protocol>://<host/IP>:<port>.\n"); goto error; @@ -1130,7 +1130,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph if (!remotefs.is_empty()) { file_access_network_client = memnew(FileAccessNetworkClient); int port; - if (remotefs.find(":") != -1) { + if (remotefs.contains(":")) { port = remotefs.get_slicec(':', 1).to_int(); remotefs = remotefs.get_slicec(':', 0); } else { |