[ox] Get building in MSVC
This commit is contained in:
parent
a66f1499a4
commit
4cbf1b9a9a
@ -28,7 +28,8 @@ std::string PassThroughFS::basePath() {
|
||||
Error PassThroughFS::mkdir(const char *path, bool recursive) {
|
||||
bool success = false;
|
||||
const auto p = m_path / stripSlash(path);
|
||||
oxTrace("ox::fs::PassThroughFS::mkdir") << p.c_str();
|
||||
const auto u8p = p.u8string();
|
||||
oxTrace("ox::fs::PassThroughFS::mkdir") << u8p.c_str();
|
||||
if (recursive) {
|
||||
success = std::filesystem::create_directories(p);
|
||||
} else {
|
||||
|
@ -89,9 +89,7 @@ class PassThroughFS: public FileSystem {
|
||||
template<typename F>
|
||||
ox::Error PassThroughFS::ls(const char *dir, F cb) {
|
||||
for (auto &p : std::filesystem::directory_iterator(m_path / stripSlash(dir))) {
|
||||
if (auto err = cb(p.path().filename().c_str(), 0); err) {
|
||||
return err;
|
||||
}
|
||||
oxReturnError(cb(p.path().filename().u8string(), 0));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
4
deps/ox/src/ox/mc/presenceindicator.hpp
vendored
4
deps/ox/src/ox/mc/presenceindicator.hpp
vendored
@ -16,8 +16,8 @@ namespace ox {
|
||||
class FieldPresenceIndicator {
|
||||
private:
|
||||
uint8_t *m_mask = nullptr;
|
||||
int m_maskLen = 0;
|
||||
int m_fields = 0;
|
||||
std::size_t m_maskLen = 0;
|
||||
std::size_t m_fields = 0;
|
||||
|
||||
public:
|
||||
FieldPresenceIndicator(uint8_t *mask, std::size_t maxLen);
|
||||
|
3
deps/ox/src/ox/std/hardware.hpp
vendored
3
deps/ox/src/ox/std/hardware.hpp
vendored
@ -22,7 +22,8 @@
|
||||
|
||||
#else
|
||||
|
||||
#warn "Undefined hardware"
|
||||
//TODO: fix warnning
|
||||
//#warn "Undefined hardware"
|
||||
|
||||
#endif
|
||||
|
||||
|
2
deps/ox/src/ox/std/stddef.hpp
vendored
2
deps/ox/src/ox/std/stddef.hpp
vendored
@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if OX_USE_STDLIB
|
||||
#ifdef OX_USE_STDLIB
|
||||
#include <cstddef>
|
||||
#else
|
||||
#define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
|
4
deps/ox/src/ox/std/strops.hpp
vendored
4
deps/ox/src/ox/std/strops.hpp
vendored
@ -96,7 +96,7 @@ template<typename T1, typename T2>
|
||||
int retval = -1;
|
||||
for (std::size_t i = 0; i < maxLen && str[i]; i++) {
|
||||
if (str[i] == character) {
|
||||
retval = i;
|
||||
retval = static_cast<int>(i);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
@ -106,7 +106,7 @@ template<typename T1, typename T2>
|
||||
int retval = -1;
|
||||
for (std::size_t i = 0; i < maxLen && str[i]; i++) {
|
||||
if (str[i] == character) {
|
||||
retval = i;
|
||||
retval = static_cast<int>(i);
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
|
1
deps/ox/src/ox/std/trace.cpp
vendored
1
deps/ox/src/ox/std/trace.cpp
vendored
@ -10,7 +10,6 @@
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "trace.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user