mirror of https://github.com/WerWolv/ImHex
fix: Build issues on clang
This commit is contained in:
parent
e2fdd91956
commit
c2d70dbd50
|
|
@ -1,5 +1,7 @@
|
||||||
#include <hex/helpers/binary_pattern.hpp>
|
#include <hex/helpers/binary_pattern.hpp>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace hex {
|
namespace hex {
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,6 @@ namespace hex::plugin::remote {
|
||||||
private:
|
private:
|
||||||
LIBSSH2_SFTP_HANDLE* m_handle = nullptr;
|
LIBSSH2_SFTP_HANDLE* m_handle = nullptr;
|
||||||
bool m_atEOF = false;
|
bool m_atEOF = false;
|
||||||
SSHClient::OpenMode m_mode = SSHClient::OpenMode::Read;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RemoteFileSSH : public SSHClient::RemoteFile {
|
class RemoteFileSSH : public SSHClient::RemoteFile {
|
||||||
|
|
@ -175,8 +174,7 @@ namespace hex::plugin::remote {
|
||||||
std::vector<u8> executeCommand(const std::string &command, std::span<const u8> writeData = {}) const;
|
std::vector<u8> executeCommand(const std::string &command, std::span<const u8> writeData = {}) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LIBSSH2_SESSION* m_handle = nullptr;
|
LIBSSH2_SESSION *m_handle = nullptr;
|
||||||
LIBSSH2_CHANNEL* m_channel = nullptr;
|
|
||||||
bool m_atEOF = false;
|
bool m_atEOF = false;
|
||||||
u64 m_seekPosition = 0x00;
|
u64 m_seekPosition = 0x00;
|
||||||
std::string m_readCommand, m_writeCommand, m_sizeCommand;
|
std::string m_readCommand, m_writeCommand, m_sizeCommand;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
#include <wolv/utils/string.hpp>
|
#include <wolv/utils/string.hpp>
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <charconv>
|
||||||
|
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(OS_WINDOWS)
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
@ -247,7 +248,7 @@ namespace hex::plugin::remote {
|
||||||
return fmt::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));
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteFileSFTP::RemoteFileSFTP(LIBSSH2_SFTP_HANDLE* handle, SSHClient::OpenMode mode) : m_handle(handle), m_mode(mode) {}
|
RemoteFileSFTP::RemoteFileSFTP(LIBSSH2_SFTP_HANDLE* handle, SSHClient::OpenMode mode) : RemoteFile(mode), m_handle(handle) {}
|
||||||
|
|
||||||
RemoteFileSFTP::~RemoteFileSFTP() {
|
RemoteFileSFTP::~RemoteFileSFTP() {
|
||||||
if (m_handle) {
|
if (m_handle) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue