From bc05bd12e5c7eea2f77539a801fa4c244a76be72 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 25 Jan 2026 02:06:14 -0600 Subject: [PATCH] [ox/model] Rename and fix isBString helpers --- deps/ox/src/ox/model/descwrite.hpp | 2 +- deps/ox/src/ox/model/modelvalue.hpp | 2 +- deps/ox/src/ox/model/types.hpp | 30 ++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/deps/ox/src/ox/model/descwrite.hpp b/deps/ox/src/ox/model/descwrite.hpp index 256c96f8..b66026ac 100644 --- a/deps/ox/src/ox/model/descwrite.hpp +++ b/deps/ox/src/ox/model/descwrite.hpp @@ -187,7 +187,7 @@ constexpr ox::Error TypeDescWriter::setTypeInfo( PrimitiveType pt; if constexpr(is_union_v) { pt = PrimitiveType::Union; - } else if constexpr(isBasicString_v || isBString_v) { + } else if constexpr(isBasicString_v || isIString_v) { pt = PrimitiveType::String; } else { pt = PrimitiveType::Struct; diff --git a/deps/ox/src/ox/model/modelvalue.hpp b/deps/ox/src/ox/model/modelvalue.hpp index 95890df5..cd6183b1 100644 --- a/deps/ox/src/ox/model/modelvalue.hpp +++ b/deps/ox/src/ox/model/modelvalue.hpp @@ -100,7 +100,7 @@ class ModelValue { return Type::Union; } else if constexpr(is_same_v) { return Type::Object; - } else if constexpr(isBasicString_v || isBString_v) { + } else if constexpr(isBasicString_v || isIString_v) { return Type::String; } else if constexpr(is_same_v) { return Type::Vector; diff --git a/deps/ox/src/ox/model/types.hpp b/deps/ox/src/ox/model/types.hpp index fe530831..2256930a 100644 --- a/deps/ox/src/ox/model/types.hpp +++ b/deps/ox/src/ox/model/types.hpp @@ -31,18 +31,18 @@ namespace ox { namespace types { -constexpr StringView BasicString = "net.drinkingtea.ox.BasicString"; -constexpr StringView IString = "net.drinkingtea.ox.IString"; -constexpr StringView String = "B.string"; -constexpr StringView Bool = "B.bool"; -constexpr StringView Uint8 = "B.uint8"; -constexpr StringView Uint16 = "B.uint16"; -constexpr StringView Uint32 = "B.uint32"; -constexpr StringView Uint64 = "B.uint64"; -constexpr StringView Int8 = "B.int8"; -constexpr StringView Int16 = "B.int16"; -constexpr StringView Int32 = "B.int32"; -constexpr StringView Int64 = "B.int64"; +constexpr StringLiteral BasicString = "net.drinkingtea.ox.BasicString"; +constexpr StringLiteral IString = "net.drinkingtea.ox.IString"; +constexpr StringLiteral String = "B.string"; +constexpr StringLiteral Bool = "B.bool"; +constexpr StringLiteral Uint8 = "B.uint8"; +constexpr StringLiteral Uint16 = "B.uint16"; +constexpr StringLiteral Uint32 = "B.uint32"; +constexpr StringLiteral Uint64 = "B.uint64"; +constexpr StringLiteral Int8 = "B.int8"; +constexpr StringLiteral Int16 = "B.int16"; +constexpr StringLiteral Int32 = "B.int32"; +constexpr StringLiteral Int64 = "B.int64"; } template @@ -63,17 +63,17 @@ static_assert(isBasicString_v>); static_assert(isBasicString_v); template -consteval bool isBString(const T*) noexcept { +consteval bool isIString(const T*) noexcept { return false; } template -consteval bool isBString(const BasicString*) noexcept { +consteval bool isIString(const BasicString*) noexcept { return true; } template -constexpr bool isBString_v = isBasicString(static_cast(nullptr)); +constexpr bool isIString_v = isIString(static_cast(nullptr)); static_assert(isBasicString_v>); static_assert(isBasicString_v>);