[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,15 +34,16 @@ constexpr auto buildTypeId() noexcept {
return ox::sfmt("{};{}", name, version);
}
static constexpr auto buildTypeId(CRStringView name, int version,
const TypeParamPack &typeParams = {}) noexcept {
static constexpr auto buildTypeId(
CRStringView name, int version,
const TypeParamPack &typeParams = {}) noexcept {
String tp;
if (!typeParams.empty()) {
tp = "#";
for (const auto &p : typeParams) {
tp += p + ",";
}
tp.resize(tp.len() - 1);
tp.resize(tp.len());
tp += "#";
}
return ox::sfmt("{}{};{}", name, tp, version);