diff --git a/deps/ox/src/ox/std/string.hpp b/deps/ox/src/ox/std/string.hpp index 51f432be..df9c759e 100644 --- a/deps/ox/src/ox/std/string.hpp +++ b/deps/ox/src/ox/std/string.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2022 gary@drinkingtea.net + * Copyright 2015 - 2023 gary@drinkingtea.net * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -8,7 +8,7 @@ #pragma once -#if defined(OX_USE_STDLIB) +#if __has_include() #include #endif @@ -200,7 +200,7 @@ class BasicString { return c_str(); } -#ifdef OX_USE_STDLIB +#if __has_include() [[nodiscard]] inline std::string toStdString() const { return c_str(); @@ -232,7 +232,7 @@ class BasicString { template constexpr BasicString::BasicString() noexcept { - if (m_buff.size()) { + if (!m_buff.empty()) { m_buff[0] = 0; } else { m_buff.push_back(0); @@ -242,14 +242,14 @@ constexpr BasicString::BasicString() noexcept { template constexpr BasicString::BasicString(std::size_t cap) noexcept: m_buff(cap + 1) { // GCC complains if you don't do this pretty unnecessary size check - if (m_buff.size()) { + if (!m_buff.empty()) { m_buff[0] = 0; } } template constexpr BasicString::BasicString(const char *str) noexcept { - if (m_buff.size()) { + if (!m_buff.empty()) { m_buff[0] = 0; } else { m_buff.push_back(0); @@ -259,7 +259,7 @@ constexpr BasicString::BasicString(const char *str) noexcept template constexpr BasicString::BasicString(const char8_t *str) noexcept { - if (m_buff.size()) { + if (!m_buff.empty()) { m_buff[0] = 0; } else { m_buff.push_back(0); diff --git a/deps/ox/src/ox/std/trace.hpp b/deps/ox/src/ox/std/trace.hpp index b7c7787c..36823bd5 100644 --- a/deps/ox/src/ox/std/trace.hpp +++ b/deps/ox/src/ox/std/trace.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2015 - 2022 gary@drinkingtea.net + * Copyright 2015 - 2023 gary@drinkingtea.net * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this