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

Use compile-time Unicode string conversion

Thanks to this syntax introduced in C++11, this reduces the amount of work
that needs to be performed at run-time while making the code more terse.
This commit is contained in:
Hugo Locurcio
2023-08-07 10:37:41 +02:00
parent 16a93563bf
commit e9f723006a
11 changed files with 19 additions and 19 deletions

View File

@@ -2822,7 +2822,7 @@ void Node3DEditorViewport::_notification(int p_what) {
}
if (show_info) {
const String viewport_size = vformat(String::utf8("%d × %d"), viewport->get_size().x, viewport->get_size().y);
const String viewport_size = vformat(U"%d × %d", viewport->get_size().x, viewport->get_size().y);
String text;
text += vformat(TTR("X: %s\n"), rtos(current_camera->get_position().x).pad_decimals(1));
text += vformat(TTR("Y: %s\n"), rtos(current_camera->get_position().y).pad_decimals(1));