mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Merge pull request #101595 from adamscott/fix-with-String--num_64
Replace some problematic uses of `String::num` to `String::num_int64`
This commit is contained in:
commit
0726d3c7d5
10 changed files with 12 additions and 12 deletions
|
@ -173,12 +173,12 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
|
||||||
} else {
|
} else {
|
||||||
const int ms = waits[i];
|
const int ms = waits[i];
|
||||||
OS::get_singleton()->delay_usec(ms * 1000);
|
OS::get_singleton()->delay_usec(ms * 1000);
|
||||||
print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec.");
|
print_verbose("Remote Debugger: Connection failed with status: '" + String::num_int64(tcp_client->get_status()) + "', retrying in " + String::num_int64(ms) + " msec.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
|
if (tcp_client->get_status() != StreamPeerTCP::STATUS_CONNECTED) {
|
||||||
ERR_PRINT(vformat("Remote Debugger: Unable to connect. Status: %s.", String::num(tcp_client->get_status())));
|
ERR_PRINT(vformat("Remote Debugger: Unable to connect. Status: %s.", String::num_int64(tcp_client->get_status())));
|
||||||
return FAILED;
|
return FAILED;
|
||||||
}
|
}
|
||||||
connected = true;
|
connected = true;
|
||||||
|
|
|
@ -1747,7 +1747,7 @@ void EditorFileSystem::_save_filesystem_cache(EditorFileSystemDirectory *p_dir,
|
||||||
if (!p_dir) {
|
if (!p_dir) {
|
||||||
return; //none
|
return; //none
|
||||||
}
|
}
|
||||||
p_file->store_line("::" + p_dir->get_path() + "::" + String::num(p_dir->modified_time));
|
p_file->store_line("::" + p_dir->get_path() + "::" + String::num_int64(p_dir->modified_time));
|
||||||
|
|
||||||
for (int i = 0; i < p_dir->files.size(); i++) {
|
for (int i = 0; i < p_dir->files.size(); i++) {
|
||||||
const EditorFileSystemDirectory::FileInfo *file_info = p_dir->files[i];
|
const EditorFileSystemDirectory::FileInfo *file_info = p_dir->files[i];
|
||||||
|
|
|
@ -2209,7 +2209,7 @@ Vector<String> EditorExportPlatform::gen_export_flags(BitField<EditorExportPlatf
|
||||||
if (p_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
|
if (p_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
|
||||||
ret.push_back("--remote-debug");
|
ret.push_back("--remote-debug");
|
||||||
|
|
||||||
ret.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
|
ret.push_back(get_debug_protocol() + host + ":" + String::num_int64(remote_port));
|
||||||
|
|
||||||
List<String> breakpoints;
|
List<String> breakpoints;
|
||||||
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
||||||
|
|
|
@ -757,7 +757,7 @@ void ScriptTextEditor::_update_bookmark_list() {
|
||||||
line = line.substr(0, 50);
|
line = line.substr(0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - `" + line + "`");
|
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - `" + line + "`");
|
||||||
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -912,7 +912,7 @@ void ScriptTextEditor::_update_breakpoint_list() {
|
||||||
line = line.substr(0, 50);
|
line = line.substr(0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
breakpoints_menu->add_item(String::num((int)breakpoint_list[i] + 1) + " - `" + line + "`");
|
breakpoints_menu->add_item(String::num_int64(breakpoint_list[i] + 1) + " - `" + line + "`");
|
||||||
breakpoints_menu->set_item_metadata(-1, breakpoint_list[i]);
|
breakpoints_menu->set_item_metadata(-1, breakpoint_list[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,7 @@ void TextEditor::_update_bookmark_list() {
|
||||||
line = line.substr(0, 50);
|
line = line.substr(0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
|
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - \"" + line + "\"");
|
||||||
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1075,7 +1075,7 @@ void TextShaderEditor::_update_bookmark_list() {
|
||||||
line = line.substr(0, 50);
|
line = line.substr(0, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
bookmarks_menu->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\"");
|
bookmarks_menu->add_item(String::num_int64(bookmark_list[i] + 1) + " - \"" + line + "\"");
|
||||||
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
bookmarks_menu->set_item_metadata(-1, bookmark_list[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -196,7 +196,7 @@ Error RegEx::compile(const String &p_pattern, bool p_show_error) {
|
||||||
if (p_show_error) {
|
if (p_show_error) {
|
||||||
PCRE2_UCHAR32 buf[256];
|
PCRE2_UCHAR32 buf[256];
|
||||||
pcre2_get_error_message_32(err, buf, 256);
|
pcre2_get_error_message_32(err, buf, 256);
|
||||||
String message = String::num(offset) + ": " + String((const char32_t *)buf);
|
String message = String::num_int64(offset) + ": " + String((const char32_t *)buf);
|
||||||
ERR_PRINT(message.utf8());
|
ERR_PRINT(message.utf8());
|
||||||
}
|
}
|
||||||
return FAILED;
|
return FAILED;
|
||||||
|
|
|
@ -93,7 +93,7 @@ Error EMWSPeer::connect_to_url(const String &p_url, Ref<TLSOptions> p_tls_option
|
||||||
requested_url = scheme + host;
|
requested_url = scheme + host;
|
||||||
|
|
||||||
if (port && ((scheme == "ws://" && port != 80) || (scheme == "wss://" && port != 443))) {
|
if (port && ((scheme == "ws://" && port != 80) || (scheme == "wss://" && port != 443))) {
|
||||||
requested_url += ":" + String::num(port);
|
requested_url += ":" + String::num_int64(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!path.is_empty()) {
|
if (!path.is_empty()) {
|
||||||
|
|
|
@ -3163,7 +3163,7 @@ Error EditorExportPlatformIOS::run(const Ref<EditorExportPreset> &p_preset, int
|
||||||
if (p_debug_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
|
if (p_debug_flags.has_flag(DEBUG_FLAG_REMOTE_DEBUG)) {
|
||||||
cmd_args_list.push_back("--remote-debug");
|
cmd_args_list.push_back("--remote-debug");
|
||||||
|
|
||||||
cmd_args_list.push_back(get_debug_protocol() + host + ":" + String::num(remote_port));
|
cmd_args_list.push_back(get_debug_protocol() + host + ":" + String::num_int64(remote_port));
|
||||||
|
|
||||||
List<String> breakpoints;
|
List<String> breakpoints;
|
||||||
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
|
||||||
|
|
|
@ -191,7 +191,7 @@ String iOS::get_model() const {
|
||||||
String iOS::get_rate_url(int p_app_id) const {
|
String iOS::get_rate_url(int p_app_id) const {
|
||||||
String app_url_path = "itms-apps://itunes.apple.com/app/idAPP_ID";
|
String app_url_path = "itms-apps://itunes.apple.com/app/idAPP_ID";
|
||||||
|
|
||||||
String ret = app_url_path.replace("APP_ID", String::num(p_app_id));
|
String ret = app_url_path.replace("APP_ID", String::num_int64(p_app_id));
|
||||||
|
|
||||||
print_verbose(vformat("Returning rate url %s", ret));
|
print_verbose(vformat("Returning rate url %s", ret));
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue