Skip to content

Commit 33e1643

Browse files
committed
Replace some problematic uses of String::num to String::num_int64
1 parent 4ce466d commit 33e1643

File tree

10 files changed

+12
-12
lines changed

10 files changed

+12
-12
lines changed

core/debugger/remote_debugger_peer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
173173
} else {
174174
const int ms = waits[i];
175175
OS::get_singleton()->delay_usec(ms * 1000);
176-
print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
176+
print_verbose("Remote Debugger: Connection failed with status: '" + String::num_int64(tcp_client->get_status()) + "', retrying in " + String::num_int64(ms) + " msec.");
177177
}
178178
}
179179

180180
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
181-
ERR_PRINT(vformat("Remote Debugger: Unable to connect. Status: %s.", String::num(tcp_client->get_status())));
181+
ERR_PRINT(vformat("Remote Debugger: Unable to connect. Status: %s.", String::num_int64(tcp_client->get_status())));
182182
return FAILED;
183183
}
184184
connected = true;

editor/editor_file_system.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1747,7 +1747,7 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
17471747
if (!p_dir) {
17481748
return; //none
17491749
}
1750-
p_file->store_line("::" + p_dir->get_path() + "::" + String::num(p_dir->modified_time));
1750+
p_file->store_line("::" + p_dir->get_path() + "::" + String::num_int64(p_dir->modified_time));
17511751

17521752
for (int i = 0; i < p_dir->files.size(); i++) {
17531753
const EditorFileSystemDirectory::FileInfo *file_info = p_dir->files[i];

editor/export/editor_export_platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2209,7 +2209,7 @@ Vector<String> EditorExportPlatform::gen_export_flags(BitField<EditorExportPlatf
22092209
if (p_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
22102210
ret.push_back("--remote-debug");
22112211

2212-
ret.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
2212+
ret.push_back(get_debug_protocol() + host + ":" + String::num_int64(remote_port));
22132213

22142214
List<String> breakpoints;
22152215
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);

editor/plugins/script_text_editor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ void ScriptTextEditor::_update_bookmark_list() {
757757
line = line.substr(0, 50);
758758
}
759759

760-
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - `" + line + "`");
760+
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - `" + line + "`");
761761
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
762762
}
763763
}
@@ -912,7 +912,7 @@ void ScriptTextEditor::_update_breakpoint_list() {
912912
line = line.substr(0, 50);
913913
}
914914

915-
breakpoints_menu->add_item(String::num((int)breakpoint_list[i] + 1) + " - `" + line + "`");
915+
breakpoints_menu->add_item(String::num_int64(breakpoint_list[i] + 1) + " - `" + line + "`");
916916
breakpoints_menu->set_item_metadata(-1, breakpoint_list[i]);
917917
}
918918
}

editor/plugins/text_editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void TextEditor::_update_bookmark_list() {
229229
line = line.substr(0, 50);
230230
}
231231

232-
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
232+
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - \"" + line + "\"");
233233
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
234234
}
235235
}

editor/plugins/text_shader_editor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ void TextShaderEditor::_update_bookmark_list() {
10751075
line = line.substr(0, 50);
10761076
}
10771077

1078-
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
1078+
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - \"" + line + "\"");
10791079
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
10801080
}
10811081
}

modules/regex/regex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Error RegEx::compile(const String &p_pattern, bool p_show_error) {
196196
if (p_show_error) {
197197
PCRE2_UCHAR32 buf[256];
198198
pcre2_get_error_message_32(err, buf, 256);
199-
String message = String::num(offset) + ": " + String((const char32_t *)buf);
199+
String message = String::num_int64(offset) + ": " + String((const char32_t *)buf);
200200
ERR_PRINT(message.utf8());
201201
}
202202
return FAILED;

modules/websocket/emws_peer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Error EMWSPeer::connect_to_url(const String &p_url, Ref<TLSOptions> p_tls_option
9393
requested_url = scheme + host;
9494

9595
if (port && ((scheme == "ws://" && port != 80) || (scheme == "wss://" && port != 443))) {
96-
requested_url += ":" + String::num(port);
96+
requested_url += ":" + String::num_int64(port);
9797
}
9898

9999
if (!path.is_empty()) {

platform/ios/export/export_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3163,7 +3163,7 @@ Error EditorExportPlatformIOS::run(const Ref<EditorExportPreset> &p_preset, int
31633163
if (p_debug_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
31643164
cmd_args_list.push_back("--remote-debug");
31653165

3166-
cmd_args_list.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
3166+
cmd_args_list.push_back(get_debug_protocol() + host + ":" + String::num_int64(remote_port));
31673167

31683168
List<String> breakpoints;
31693169
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);

platform/ios/ios.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
String iOS::get_rate_url(int p_app_id) const {
192192
String app_url_path = "itms-apps://itunes.apple.com/app/idAPP_ID";
193193

194-
String ret = app_url_path.replace("APP_ID", String::num(p_app_id));
194+
String ret = app_url_path.replace("APP_ID", String::num_int64(p_app_id));
195195

196196
print_verbose(vformat("Returning rate url %s", ret));
197197
return ret;

0 commit comments

Comments
 (0)