You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add contains_char() for single-character 'contains' calls.
This commit is contained in:
@@ -1290,7 +1290,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
if (N) {
|
||||
String vm = N->get();
|
||||
|
||||
if (!vm.contains("x")) { // invalid parameter format
|
||||
if (!vm.contains_char('x')) { // invalid parameter format
|
||||
|
||||
OS::get_singleton()->print("Invalid resolution '%s', it should be e.g. '1280x720'.\n",
|
||||
vm.utf8().get_data());
|
||||
@@ -1333,7 +1333,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
if (N) {
|
||||
String vm = N->get();
|
||||
|
||||
if (!vm.contains(",")) { // invalid parameter format
|
||||
if (!vm.contains_char(',')) { // invalid parameter format
|
||||
|
||||
OS::get_singleton()->print("Invalid position '%s', it should be e.g. '80,128'.\n",
|
||||
vm.utf8().get_data());
|
||||
@@ -1832,7 +1832,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
|
||||
// 'project.godot' file which will only be available through the network if this is enabled
|
||||
if (!remotefs.is_empty()) {
|
||||
int port;
|
||||
if (remotefs.contains(":")) {
|
||||
if (remotefs.contains_char(':')) {
|
||||
port = remotefs.get_slicec(':', 1).to_int();
|
||||
remotefs = remotefs.get_slicec(':', 0);
|
||||
} else {
|
||||
@@ -3275,7 +3275,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
// Dummy text driver cannot draw any text, making the editor unusable if selected.
|
||||
continue;
|
||||
}
|
||||
if (!text_driver_options.is_empty() && !text_driver_options.contains(",")) {
|
||||
if (!text_driver_options.is_empty() && !text_driver_options.contains_char(',')) {
|
||||
// Not the first option; add a comma before it as a separator for the property hint.
|
||||
text_driver_options += ",";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user