diff --git a/deps/ox/.gitignore b/deps/ox/.gitignore index 3572ba40..f9d2f1c6 100644 --- a/deps/ox/.gitignore +++ b/deps/ox/.gitignore @@ -4,3 +4,7 @@ build/*-asan build/*-debug build/*-release tags +conanbuildinfo.cmake +conanbuildinfo.txt +conaninfo.txt +graph_info.json diff --git a/deps/ox/src/ox/CMakeLists.txt b/deps/ox/src/ox/CMakeLists.txt index ceecbd8c..1029899b 100644 --- a/deps/ox/src/ox/CMakeLists.txt +++ b/deps/ox/src/ox/CMakeLists.txt @@ -3,6 +3,7 @@ if(OX_USE_STDLIB STREQUAL "ON") endif(OX_USE_STDLIB STREQUAL "ON") add_subdirectory(fs) add_subdirectory(mc) +add_subdirectory(oc) add_subdirectory(ptrarith) add_subdirectory(model) add_subdirectory(std) diff --git a/deps/ox/src/ox/fs/filestore/filestoretemplate.hpp b/deps/ox/src/ox/fs/filestore/filestoretemplate.hpp index ee54a4a1..1c1b7ef2 100644 --- a/deps/ox/src/ox/fs/filestore/filestoretemplate.hpp +++ b/deps/ox/src/ox/fs/filestore/filestoretemplate.hpp @@ -369,14 +369,14 @@ Error FileStoreTemplate::read(InodeId_t id, FsSize_t readStart, if (src.valid()) { auto srcData = src->data(); if (srcData.valid()) { - auto sub = srcData.template subPtr(readStart, readSize); + auto sub = srcData.template subPtr(readStart, readSize); if (sub.valid() && sub.size() % sizeof(T)) { for (FsSize_t i = 0; i < sub.size() / sizeof(T); i++) { // do byte-by-byte copy to ensure alignment is right when // copying to final destination T tmp; for (size_t i = 0; i < sizeof(T); i++) { - reinterpret_cast(&tmp)[i] = *(reinterpret_cast(sub.get()) + i); + reinterpret_cast(&tmp)[i] = *(sub.get() + i); } *(data + i) = tmp; } diff --git a/deps/ox/src/ox/mc/intops.hpp b/deps/ox/src/ox/mc/intops.hpp index cc70d8fd..b409f592 100644 --- a/deps/ox/src/ox/mc/intops.hpp +++ b/deps/ox/src/ox/mc/intops.hpp @@ -124,7 +124,7 @@ template const auto bytes = countBytes(buff[0]); if (bytes == 9) { *bytesRead = bytes; - I out; + I out = 0; ox_memcpy(&out, &buff[1], sizeof(I)); return {LittleEndian(out), 0}; } else if (buffLen >= bytes) { diff --git a/deps/ox/src/ox/mc/presenceindicator.cpp b/deps/ox/src/ox/mc/presenceindicator.cpp index 24bb3018..d0590cfa 100644 --- a/deps/ox/src/ox/mc/presenceindicator.cpp +++ b/deps/ox/src/ox/mc/presenceindicator.cpp @@ -38,4 +38,20 @@ Error FieldPresenceIndicator::set(int i, bool on) { } } +void FieldPresenceIndicator::setFields(int fields) noexcept { + m_fields = fields; +} + +int FieldPresenceIndicator::getFields() const noexcept { + return m_fields; +} + +void FieldPresenceIndicator::setMaxLen(int maxLen) noexcept { + m_maskLen = maxLen; +} + +int FieldPresenceIndicator::getMaxLen() const noexcept { + return m_maskLen; +} + } diff --git a/deps/ox/src/ox/mc/presenceindicator.hpp b/deps/ox/src/ox/mc/presenceindicator.hpp index c90273b8..64e4c116 100644 --- a/deps/ox/src/ox/mc/presenceindicator.hpp +++ b/deps/ox/src/ox/mc/presenceindicator.hpp @@ -26,30 +26,14 @@ class FieldPresenceIndicator { Error set(int i, bool on); - constexpr void setFields(int) noexcept; + void setFields(int) noexcept; - constexpr int getFields() const noexcept; + int getFields() const noexcept; - constexpr void setMaxLen(int) noexcept; + void setMaxLen(int) noexcept; - constexpr int getMaxLen() const noexcept; + int getMaxLen() const noexcept; }; -constexpr void FieldPresenceIndicator::setFields(int fields) noexcept { - m_fields = fields; -} - -constexpr int FieldPresenceIndicator::getFields() const noexcept { - return m_fields; -} - -constexpr void FieldPresenceIndicator::setMaxLen(int maxLen) noexcept { - m_maskLen = maxLen; -} - -constexpr int FieldPresenceIndicator::getMaxLen() const noexcept { - return m_maskLen; -} - } diff --git a/deps/ox/src/ox/model/desctypes.hpp b/deps/ox/src/ox/model/desctypes.hpp index f7732af7..7bcc1940 100644 --- a/deps/ox/src/ox/model/desctypes.hpp +++ b/deps/ox/src/ox/model/desctypes.hpp @@ -77,7 +77,7 @@ struct DescriptorField { ~DescriptorField(); - constexpr const DescriptorField &operator=(DescriptorField &&other) noexcept { + const DescriptorField &operator=(DescriptorField &&other) noexcept { type = other.type; fieldName = other.fieldName; subscriptLevels = other.subscriptLevels; diff --git a/deps/ox/src/ox/std/error.hpp b/deps/ox/src/ox/std/error.hpp index fa8ec204..ee219900 100644 --- a/deps/ox/src/ox/std/error.hpp +++ b/deps/ox/src/ox/std/error.hpp @@ -9,6 +9,7 @@ #pragma once #include "typetraits.hpp" +#include "utility.hpp" #ifdef DEBUG #define OxError(x) ox::_error(__FILE__, __LINE__, x) @@ -59,7 +60,7 @@ struct ValErr { inline constexpr ValErr() = default; - inline constexpr ValErr(T value, Error error = 0): value(value), error(error) { + inline constexpr ValErr(T value, Error error = 0): value(ox::move(value)), error(error) { } inline constexpr operator const T&() const { diff --git a/deps/ox/src/ox/std/hashmap.hpp b/deps/ox/src/ox/std/hashmap.hpp index 12d0de5a..76e85f59 100644 --- a/deps/ox/src/ox/std/hashmap.hpp +++ b/deps/ox/src/ox/std/hashmap.hpp @@ -53,7 +53,7 @@ class HashMap { /** * K is assumed to be a null terminated string. */ - static std::uint64_t hash(K, int len = 0xFFFF) noexcept; + static uint64_t hash(K, int len = 0xFFFF) noexcept; /** * K is assumed to be a null terminated string. @@ -126,8 +126,8 @@ void HashMap::expand() { } template -std::uint64_t HashMap::hash(K k, int len) noexcept { - std::uint64_t sum = 1; +uint64_t HashMap::hash(K k, int len) noexcept { + uint64_t sum = 1; for (int i = 0; i < len && k[i]; i++) { sum += ((sum + k[i]) * 7) * sum; }