mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
Fixed windows compilation
This commit is contained in:
+3
-2
@@ -1,16 +1,17 @@
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__) || defined(_WIN32)
|
||||
#include <io.h>
|
||||
#include <sys/utime.h>
|
||||
#include <nposix/dirent.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
+1231
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@
|
||||
extern "C" {
|
||||
#include <libmio0/mio0.h>
|
||||
}
|
||||
#include <stdexcept>
|
||||
|
||||
std::unordered_map<uint32_t, std::vector<char>> MIO0Decoder::gCachedChunks;
|
||||
|
||||
@@ -11,7 +12,7 @@ std::vector<char>& MIO0Decoder::Decode(std::vector<uint8_t>& buffer, uint32_t of
|
||||
|
||||
mio0_header_t head;
|
||||
if(!mio0_decode_header(in_buf, &head)){
|
||||
throw std::runtime_error("Invalid MIO0 header");
|
||||
throw std::runtime_error("Failed to decode MIO0 header");
|
||||
}
|
||||
|
||||
uint8_t* decompressed = new uint8_t[head.dest_size];
|
||||
|
||||
Reference in New Issue
Block a user