mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
impr: Remove hex::format, improve format and logging type safety
This commit is contained in:
@@ -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) {}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user