1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Use get_slicec instead of get_slice for single character splitters

This commit is contained in:
A Thousand Ships
2024-11-16 17:16:07 +01:00
parent b5bdb88062
commit 466590d0ec
58 changed files with 210 additions and 210 deletions

View File

@@ -1274,8 +1274,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
}
int w = vm.get_slice("x", 0).to_int();
int h = vm.get_slice("x", 1).to_int();
int w = vm.get_slicec('x', 0).to_int();
int h = vm.get_slicec('x', 1).to_int();
if (w <= 0 || h <= 0) {
OS::get_singleton()->print("Invalid resolution '%s', width and height must be above 0.\n",
@@ -1317,8 +1317,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
goto error;
}
int x = vm.get_slice(",", 0).to_int();
int y = vm.get_slice(",", 1).to_int();
int x = vm.get_slicec(',', 0).to_int();
int y = vm.get_slicec(',', 1).to_int();
init_custom_pos = Point2(x, y);
init_use_custom_pos = true;
@@ -2405,7 +2405,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
}
}
default_renderer = renderer_hints.get_slice(",", 0);
default_renderer = renderer_hints.get_slicec(',', 0);
GLOBAL_DEF_RST_BASIC(PropertyInfo(Variant::STRING, "rendering/renderer/rendering_method", PROPERTY_HINT_ENUM, renderer_hints), default_renderer);
GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer_mobile);
GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.web", "gl_compatibility"); // This is a bit of a hack until we have WebGPU support.