diff --git a/deps/ox/src/ox/claw/read.hpp b/deps/ox/src/ox/claw/read.hpp index 271b76fd..4a48022b 100644 --- a/deps/ox/src/ox/claw/read.hpp +++ b/deps/ox/src/ox/claw/read.hpp @@ -63,7 +63,7 @@ template Result readClaw(const char *buff, std::size_t buffLen) { T val; oxReturnError(readClaw(buff, buffLen, &val)); - return move(val); + return std::move(val); } template diff --git a/deps/ox/src/ox/claw/write.hpp b/deps/ox/src/ox/claw/write.hpp index 5630757d..94347f91 100644 --- a/deps/ox/src/ox/claw/write.hpp +++ b/deps/ox/src/ox/claw/write.hpp @@ -77,7 +77,7 @@ Result writeClawHeader(T *t, ClawFormat fmt) noexcept { out += tn; } out += ";"; - return move(out); + return std::move(out); } } @@ -89,7 +89,7 @@ Result writeClaw(T *t, ClawFormat fmt) { Buffer out(header.len() + data.size()); memcpy(out.data(), header.data(), header.len()); memcpy(out.data() + header.len(), data.data(), data.size()); - return move(out); + return std::move(out); } } diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.cpp b/deps/ox/src/ox/fs/filesystem/filelocation.cpp index d76d5511..a45cbc1b 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.cpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.cpp @@ -17,7 +17,7 @@ FileAddress::FileAddress(const FileAddress &other) noexcept { } FileAddress::FileAddress(FileAddress &&other) noexcept { - operator=(move(other)); + operator=(std::move(other)); } FileAddress::FileAddress(std::nullptr_t) noexcept { diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.cpp b/deps/ox/src/ox/fs/filesystem/filesystem.cpp index f4420f5e..993702e6 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.cpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.cpp @@ -41,7 +41,7 @@ Result FileSystem::read(const FileAddress &addr) noexcept { oxRequire(s, stat(addr)); Buffer buff(s.size); oxReturnError(read(addr, buff.data(), buff.size())); - return ox::move(buff); + return buff; } Error FileSystem::read(const FileAddress &addr, std::size_t readStart, std::size_t readSize, void *buffer, std::size_t *size) noexcept { diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.hpp b/deps/ox/src/ox/fs/filesystem/filesystem.hpp index 47329ea1..3b16c144 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.hpp @@ -279,7 +279,7 @@ Result> FileSystemTemplate::ls(const char * out.emplace_back(name); return OxError(0); })); - return ox::move(out); + return out; } template diff --git a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp index afc758a6..6a8f3d49 100644 --- a/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp +++ b/deps/ox/src/ox/fs/filesystem/passthroughfs.cpp @@ -103,7 +103,7 @@ Result> PassThroughFS::ls(const char *dir) noexcept { const auto u8p = p.path().filename().u8string(); out.emplace_back(reinterpret_cast(u8p.c_str())); } - return ox::move(out); + return std::move(out); } Error PassThroughFS::remove(const char *path, bool recursive) noexcept { diff --git a/deps/ox/src/ox/mc/write.hpp b/deps/ox/src/ox/mc/write.hpp index cd844421..49116006 100644 --- a/deps/ox/src/ox/mc/write.hpp +++ b/deps/ox/src/ox/mc/write.hpp @@ -231,7 +231,7 @@ Result writeMC(T *val) noexcept { MetalClawWriter writer(reinterpret_cast(buff.data()), buff.size()); oxReturnError(model(&writer, val)); buff.resize(writer.size()); - return move(buff); + return std::move(buff); } template diff --git a/deps/ox/src/ox/model/desctypes.hpp b/deps/ox/src/ox/model/desctypes.hpp index 73372dc4..1e693f0b 100644 --- a/deps/ox/src/ox/model/desctypes.hpp +++ b/deps/ox/src/ox/model/desctypes.hpp @@ -92,13 +92,13 @@ struct DescriptorField { } const DescriptorField &operator=(DescriptorField &&other) noexcept { - type = move(other.type); + type = std::move(other.type); other.type = {}; - fieldName = move(other.fieldName); - subscriptLevels = move(other.subscriptLevels); + fieldName = std::move(other.fieldName); + subscriptLevels = std::move(other.subscriptLevels); other.subscriptLevels = {}; - typeName = move(other.typeName); - ownsType = move(other.ownsType); + typeName = std::move(other.typeName); + ownsType = std::move(other.ownsType); other.ownsType = {}; return *this; } diff --git a/deps/ox/src/ox/model/descwrite.hpp b/deps/ox/src/ox/model/descwrite.hpp index 350a5922..0b830480 100644 --- a/deps/ox/src/ox/model/descwrite.hpp +++ b/deps/ox/src/ox/model/descwrite.hpp @@ -216,7 +216,7 @@ template Result writeTypeDef(T *val) noexcept { Buffer buff(units::MB); oxReturnError(writeTypeDef(buff.data(), buff.size(), val)); - return move(buff); + return std::move(buff); } } diff --git a/deps/ox/src/ox/model/modelops.hpp b/deps/ox/src/ox/model/modelops.hpp index 1d2b93ff..a5b9a977 100644 --- a/deps/ox/src/ox/model/modelops.hpp +++ b/deps/ox/src/ox/model/modelops.hpp @@ -138,7 +138,7 @@ class Mover { } else { auto &src = *v; auto &dst = *cbit_cast(m_dst->vars[m_i]); - dst = move(src); + dst = std::move(src); src = FT{}; ++m_i; return OxError(0); @@ -150,7 +150,7 @@ class Mover { for (auto i = 0l; i < elements; ++i) { auto &src = list[i]; auto &dst = cbit_cast(m_dst->vars[m_i])[i]; - dst = move(src); + dst = std::move(src); src = FT{}; } ++m_i; @@ -161,7 +161,7 @@ class Mover { constexpr Error field(const char*, UnionView u) noexcept { auto &dst = *cbit_cast(m_dst->vars[m_i]); auto &src = *u.get(); - dst = move(src); + dst = std::move(src); ++m_i; return OxError(0); } diff --git a/deps/ox/src/ox/oc/read.hpp b/deps/ox/src/ox/oc/read.hpp index 31708df0..cdebd5ed 100644 --- a/deps/ox/src/ox/oc/read.hpp +++ b/deps/ox/src/ox/oc/read.hpp @@ -228,7 +228,7 @@ template Result readOC(const char *json, std::size_t jsonLen) noexcept { T val; oxReturnError(readOC(json, jsonLen, &val)); - return move(val); + return std::move(val); } template diff --git a/deps/ox/src/ox/oc/write.hpp b/deps/ox/src/ox/oc/write.hpp index 21b6fc36..c7799abd 100644 --- a/deps/ox/src/ox/oc/write.hpp +++ b/deps/ox/src/ox/oc/write.hpp @@ -154,7 +154,7 @@ Result writeOC(T *val) noexcept { const auto str = Json::writeString(jsonBuilder, writer.m_json); Buffer buff(str.size() + 1); memcpy(buff.data(), str.c_str(), str.size() + 1); - return move(buff); + return std::move(buff); } } diff --git a/deps/ox/src/ox/std/hashmap.hpp b/deps/ox/src/ox/std/hashmap.hpp index e2a72f49..30a60c08 100644 --- a/deps/ox/src/ox/std/hashmap.hpp +++ b/deps/ox/src/ox/std/hashmap.hpp @@ -99,8 +99,8 @@ HashMap::HashMap(const HashMap &other) { template HashMap::HashMap(HashMap &&other) { - m_keys = move(other.m_keys); - m_pairs = move(other.m_pairs); + m_keys = std::move(other.m_keys); + m_pairs = std::move(other.m_pairs); } template @@ -136,8 +136,8 @@ template HashMap &HashMap::operator=(HashMap &&other) { if (this != &other) { clear(); - m_keys = move(other.m_keys); - m_pairs = move(other.m_pairs); + m_keys = std::move(other.m_keys); + m_pairs = std::move(other.m_pairs); } return *this; } diff --git a/deps/ox/src/ox/std/memory.hpp b/deps/ox/src/ox/std/memory.hpp index 14ade403..95d4f6a7 100644 --- a/deps/ox/src/ox/std/memory.hpp +++ b/deps/ox/src/ox/std/memory.hpp @@ -87,7 +87,7 @@ class UniquePtr { template constexpr UniquePtr &operator=(UniquePtr &&other) { - reset(move(other)); + reset(std::move(other)); return *this; } diff --git a/deps/ox/src/ox/std/stacktrace.cpp b/deps/ox/src/ox/std/stacktrace.cpp index 29022109..974ece06 100644 --- a/deps/ox/src/ox/std/stacktrace.cpp +++ b/deps/ox/src/ox/std/stacktrace.cpp @@ -45,7 +45,7 @@ static auto symbolicate([[maybe_unused]]char **frames, out.emplace_back(sfmt("{}", frames[i])); } #endif // __has_include() - return move(out); + return out; } #endif // defined(OX_USE_STDLIB) && __has_include() diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index 17bff72c..86abcc06 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -305,7 +305,7 @@ BasicString &BasicString::operator=(const Basi template BasicString &BasicString::operator=(BasicString &&src) noexcept { - m_buff = move(src.m_buff); + m_buff = std::move(src.m_buff); return *this; } @@ -361,7 +361,7 @@ BasicString BasicString::operator+(const char memcpy(&cpy.m_buff[currentLen], str, strLen); // make sure last element is a null terminator cpy.m_buff[currentLen + strLen] = 0; - return move(cpy); + return cpy; } template @@ -461,7 +461,7 @@ BasicString BasicString::substr(std::size_t be const auto buff = out.data(); memcpy(buff, src, size); buff[size] = 0; - return move(out); + return out; } template diff --git a/deps/ox/src/ox/std/utility.hpp b/deps/ox/src/ox/std/utility.hpp index 9d76f5b9..255b3d95 100644 --- a/deps/ox/src/ox/std/utility.hpp +++ b/deps/ox/src/ox/std/utility.hpp @@ -23,17 +23,21 @@ constexpr T &&forward(remove_reference_t &&t) noexcept { } template +[[deprecated]] constexpr typename remove_reference::type &&move(T &&t) noexcept { return static_cast::type&&>(t); } } -#if !__has_include() + +#if __has_include() +#include +#else namespace std { template constexpr typename ox::remove_reference::type &&move(T &&t) noexcept { return static_cast::type&&>(t); } } -#endif +#endif \ No newline at end of file diff --git a/deps/ox/src/ox/std/vector.hpp b/deps/ox/src/ox/std/vector.hpp index 9d02234f..46533bba 100644 --- a/deps/ox/src/ox/std/vector.hpp +++ b/deps/ox/src/ox/std/vector.hpp @@ -540,7 +540,7 @@ constexpr void Vector::insert(std::size_t pos, const T &val) expandCap(m_cap ? m_cap * 2 : 100); } for (auto i = m_size; i > pos; --i) { - new (&m_items[i]) T(move(m_items[i - 1])); + new (&m_items[i]) T(std::move(m_items[i - 1])); } m_items[pos] = val; ++m_size; @@ -595,7 +595,7 @@ constexpr Error Vector::unordered_erase(std::size_t pos) { return OxError(1); } --m_size; - m_items[pos] = move(m_items[m_size]); + m_items[pos] = std::move(m_items[m_size]); return OxError(0); }