[ox/model] Fix type params in buildTypeId

This commit is contained in:
Gary Talent 2024-05-23 01:29:45 -05:00
parent b882a47e58
commit fbeb08156a

View File

@ -34,7 +34,8 @@ constexpr auto buildTypeId() noexcept {
return ox::sfmt("{};{}", name, version); return ox::sfmt("{};{}", name, version);
} }
static constexpr auto buildTypeId(CRStringView name, int version, static constexpr auto buildTypeId(
CRStringView name, int version,
const TypeParamPack &typeParams = {}) noexcept { const TypeParamPack &typeParams = {}) noexcept {
String tp; String tp;
if (!typeParams.empty()) { if (!typeParams.empty()) {
@ -42,7 +43,7 @@ static constexpr auto buildTypeId(CRStringView name, int version,
for (const auto &p : typeParams) { for (const auto &p : typeParams) {
tp += p + ","; tp += p + ",";
} }
tp.resize(tp.len() - 1); tp.resize(tp.len());
tp += "#"; tp += "#";
} }
return ox::sfmt("{}{};{}", name, tp, version); return ox::sfmt("{}{};{}", name, tp, version);