#include "iwa/util/vertex_layout.hpp" namespace iwa { mijin::Optional VertexLayout::findAttribute(VertexAttributeSemantic semantic, unsigned semanticIdx) noexcept { for (VertexAttribute& attribute : attributes) { if (attribute.semantic == semantic && attribute.semanticIdx == semanticIdx) { return attribute; } } return mijin::NULL_OPTIONAL; } mijin::Optional VertexLayout::findAttribute(VertexAttributeSemantic semantic, unsigned semanticIdx) const noexcept { for (const VertexAttribute& attribute : attributes) { if (attribute.semantic == semantic && attribute.semanticIdx == semanticIdx) { return attribute; } } return mijin::NULL_OPTIONAL; } } // namespace iwa