mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-11 05:23:29 -04:00
fix(file_access): remove unnecessary special casing for windows
This commit is contained in:
parent
22af434200
commit
6ac70d64bf
@ -25,10 +25,6 @@
|
|||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <folly/portability/Windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "dwarfs/file_access.h"
|
#include "dwarfs/file_access.h"
|
||||||
#include "dwarfs/file_access_generic.h"
|
#include "dwarfs/file_access_generic.h"
|
||||||
#include "dwarfs/util.h"
|
#include "dwarfs/util.h"
|
||||||
@ -38,11 +34,7 @@ namespace dwarfs {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void assign_error_code(std::error_code& ec) {
|
void assign_error_code(std::error_code& ec) {
|
||||||
#ifdef _WIN32
|
|
||||||
ec.assign(::GetLastError(), std::system_category());
|
|
||||||
#else
|
|
||||||
ec.assign(errno, std::generic_category());
|
ec.assign(errno, std::generic_category());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class file_input_stream : public input_stream {
|
class file_input_stream : public input_stream {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user