impr: Remove hex::format, improve format and logging type safety

This commit is contained in:
WerWolv
2025-08-06 20:01:58 +02:00
parent d429424f67
commit 9cff9043ee
109 changed files with 473 additions and 455 deletions

View File

@@ -239,7 +239,7 @@ namespace hex::plugin::remote {
int length = 0;
libssh2_session_last_error(session, &errorString, &length, false);
return hex::format("{} ({})", std::string(errorString, static_cast<size_t>(length)), libssh2_session_last_errno(session));
return fmt::format("{} ({})", std::string(errorString, static_cast<size_t>(length)), libssh2_session_last_errno(session));
}
SFTPClient::RemoteFile::RemoteFile(LIBSSH2_SFTP_HANDLE* handle, OpenMode mode) : m_handle(handle), m_mode(mode) {}

View File

@@ -64,7 +64,7 @@ namespace hex::plugin::remote {
}
std::string SSHProvider::getName() const {
return hex::format("{} [{}@{}:{}]", m_remoteFilePath.filename().string(), m_username, m_host, m_port);
return fmt::format("{} [{}@{}:{}]", m_remoteFilePath.filename().string(), m_username, m_host, m_port);
}
@@ -104,7 +104,7 @@ namespace hex::plugin::remote {
m_sftpClient = std::move(client);
}
} catch (const std::exception& e) {
ui::ToastError::open(hex::format("Failed to connect to SSH server: {}", e.what()));
ui::ToastError::open(fmt::format("Failed to connect to SSH server: {}", e.what()));
return false;
}
}