[ox/model] Fix type params in buildTypeId

(synced from fbeb08156a)
This commit is contained in:
2024-05-23 01:29:45 -05:00
parent 41b3696c6b
commit 267b17543f
+4 -3
View File
@@ -34,15 +34,16 @@ 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(
const TypeParamPack &typeParams = {}) noexcept { CRStringView name, int version,
const TypeParamPack &typeParams = {}) noexcept {
String tp; String tp;
if (!typeParams.empty()) { if (!typeParams.empty()) {
tp = "#"; tp = "#";
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);