diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index 30c18ee3..17d0fc23 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -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 { diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp index c9366f10..d8039872 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.hpp @@ -89,9 +89,7 @@ class PassThroughFS: public FileSystem { template 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); } diff --git a/deps/ox/src/ox/mc/presenceindicator.hpp b/deps/ox/src/ox/mc/presenceindicator.hpp index 8e8c991a..1b2c15c8 100644 --- a/deps/ox/src/ox/mc/presenceindicator.hpp +++ b/deps/ox/src/ox/mc/presenceindicator.hpp @@ -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); diff --git a/deps/ox/src/ox/std/hardware.hpp b/deps/ox/src/ox/std/hardware.hpp index 16d54a3f..0aa27010 100644 --- a/deps/ox/src/ox/std/hardware.hpp +++ b/deps/ox/src/ox/std/hardware.hpp @@ -22,7 +22,8 @@ #else -#warn "Undefined hardware" +//TODO: fix warnning +//#warn "Undefined hardware" #endif diff --git a/deps/ox/src/ox/std/stddef.hpp b/deps/ox/src/ox/std/stddef.hpp index 1a41f50c..d9c43035 100644 --- a/deps/ox/src/ox/std/stddef.hpp +++ b/deps/ox/src/ox/std/stddef.hpp @@ -8,7 +8,7 @@ #pragma once -#if OX_USE_STDLIB +#ifdef OX_USE_STDLIB #include #else #define offsetof(type, member) __builtin_offsetof(type, member) diff --git a/deps/ox/src/ox/std/strops.hpp b/deps/ox/src/ox/std/strops.hpp index c4537081..4d17351f 100644 --- a/deps/ox/src/ox/std/strops.hpp +++ b/deps/ox/src/ox/std/strops.hpp @@ -96,7 +96,7 @@ template int retval = -1; for (std::size_t i = 0; i < maxLen && str[i]; i++) { if (str[i] == character) { - retval = i; + retval = static_cast(i); } } return retval; @@ -106,7 +106,7 @@ template int retval = -1; for (std::size_t i = 0; i < maxLen && str[i]; i++) { if (str[i] == character) { - retval = i; + retval = static_cast(i); } } return retval; diff --git a/deps/ox/src/ox/std/trace.cpp b/deps/ox/src/ox/std/trace.cpp index 4811d167..49386a5e 100644 --- a/deps/ox/src/ox/std/trace.cpp +++ b/deps/ox/src/ox/std/trace.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #endif #include "trace.hpp"