added assert to check for illegal use

Dieser Commit ist enthalten in:
Reinder Feenstra 2022-05-02 08:59:04 +02:00
Ursprung 14c41bf540
Commit 01b3379a76

Datei anzeigen

@ -128,6 +128,7 @@ class InterfaceItem
const std::vector<T>& getVectorAttribute(AttributeName name) const const std::vector<T>& getVectorAttribute(AttributeName name) const
{ {
assert(m_attributes.find(name) != m_attributes.end()); assert(m_attributes.find(name) != m_attributes.end());
assert(dynamic_cast<const VectorAttribute<T>*>(m_attributes.at(name).get()));
return static_cast<const VectorAttribute<T>*>(m_attributes.at(name).get())->values(); return static_cast<const VectorAttribute<T>*>(m_attributes.at(name).get())->values();
} }