Drawable Renderer (#1570), warnings

This commit is contained in:
Tim Sylvester
2023-05-15 15:15:19 -07:00
committed by Bart Louwers
parent 89d3a7bae9
commit 49a23db0cb
2 changed files with 2 additions and 3 deletions

View File

@@ -85,8 +85,7 @@ public:
}
return items[i] = value;
}
template <>
const ElementType& set(std::size_t i, const ElementType& value) {
const ElementType& setVariant(std::size_t i, const ElementType& value) {
if (items.size() < i + 1) {
items.resize(std::max(items.size(), i + 1));
}

View File

@@ -43,7 +43,7 @@ void DrawableBuilder::flush() {
vertexAttrs.observeAttributes([&](const std::string& iName, const VertexAttribute& iAttr) {
if (auto& drawAttr = drawAttrs->getOrAdd(iName)) {
for (std::size_t i = 0; i < impl->vertices.elements(); ++i) {
drawAttr->set<const VertexAttribute::ElementType&>(i, iAttr.get(0));
drawAttr->setVariant(i, iAttr.get(0));
}
}
});