diff --git a/src/python/magnum/trade.cpp b/src/python/magnum/trade.cpp index 3764ef2..843baa4 100644 --- a/src/python/magnum/trade.cpp +++ b/src/python/magnum/trade.cpp @@ -517,28 +517,6 @@ template accessorsForMeshIndexType(const MeshIndexType type) { - switch(type) { - #define _c(type) \ - case MeshIndexType::type: return { \ - Containers::Implementation::pythonFormatString(), \ - [](const char* item) { \ - return py::cast(*reinterpret_cast(item)); \ - }, \ - [](char* item, py::handle object) { \ - *reinterpret_cast(item) = py::cast(object); \ - }}; - /* LCOV_EXCL_START */ - _c(UnsignedByte) - _c(UnsignedShort) - _c(UnsignedInt) - /* LCOV_EXCL_STOP */ - #undef _c - } - - CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ -} - py::object materialAttribute(const Trade::MaterialData& material, const UnsignedInt layer, const UnsignedInt id) { const Trade::MaterialAttributeType type = material.attributeType(layer, id); switch(type) { @@ -591,6 +569,28 @@ py::object materialAttribute(const Trade::MaterialData& material, const Unsigned CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ } +Containers::Triple accessorsForMeshIndexType(const MeshIndexType type) { + switch(type) { + #define _c(type) \ + case MeshIndexType::type: return { \ + Containers::Implementation::pythonFormatString(), \ + [](const char* item) { \ + return py::cast(*reinterpret_cast(item)); \ + }, \ + [](char* item, py::handle object) { \ + *reinterpret_cast(item) = py::cast(object); \ + }}; + /* LCOV_EXCL_START */ + _c(UnsignedByte) + _c(UnsignedShort) + _c(UnsignedInt) + /* LCOV_EXCL_STOP */ + #undef _c + } + + CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ +} + Containers::Triple accessorsForVertexFormat(const VertexFormat format) { switch(format) { #define _c(format) \