This commit is contained in:
2024-08-29 09:33:24 -05:00
parent 17ebd56ed4
commit 07ad8a55d3
8 changed files with 19 additions and 117 deletions

View File

@ -237,13 +237,7 @@ public:
file(file &&move_file) noexcept
: file_(std::move(move_file.file_)),
path_(std::move(move_file.path_)),
read_only_(move_file.read_only_)
#if defined(_WIN32)
,
mtx_(std::move(move_file.mtx_))
#endif // defined(_WIN32)
{
}
read_only_(move_file.read_only_) {}
~file() override { close(); }
@ -251,11 +245,6 @@ private:
file_t file_;
std::string path_;
bool read_only_{false};
#if defined(_WIN32)
mutable std::unique_ptr<std::recursive_mutex> mtx_{
new std::recursive_mutex(),
};
#endif // defined(_WIN32)
private:
std::atomic_uint32_t read_buffer_size{65536U};
@ -281,8 +270,6 @@ public:
return read_buffer_size;
}
[[nodiscard]] auto get_time(time_types type) const -> std::uint64_t override;
[[nodiscard]] auto is_read_only() const -> bool override {
return read_only_;
}
@ -322,9 +309,6 @@ public:
file_ = std::move(move_file.file_);
path_ = std::move(move_file.path_);
read_only_ = move_file.read_only_;
#if defined(_WIN32)
mtx_ = std::move(move_file.mtx_);
#endif // defined(_WIN32)
}
return *this;

View File

@ -36,11 +36,6 @@ inline constexpr const auto WIN32_TIME_NANOS_PER_TICK{100ULL};
}
#endif // defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
#if defined(_WIN32)
[[nodiscard]] auto
filetime_to_unix_time(const FILETIME &file_time) -> std::uint64_t;
#endif // defined(_WIN32)
#if defined(PROJECT_ENABLE_SPDLOG) || defined(PROJECT_ENABLE_FMT)
[[nodiscard]] inline auto get_current_time_utc() -> std::time_t {
auto calendar_time = fmt::gmtime(std::time(nullptr));
@ -55,8 +50,6 @@ void get_local_time_now(struct tm &local_time);
#if defined(_WIN32)
auto strptime(const char *s, const char *f, struct tm *tm) -> const char *;
[[nodiscard]] auto time64_to_unix_time(const __time64_t &time) -> std::uint64_t;
[[nodiscard]] auto unix_time_to_filetime(std::uint64_t unix_time) -> FILETIME;
#endif // defined(_WIN32)