Browse Source

Trade: consistent terminology in an assert message.

pull/537/head
Vladimír Vondruš 5 years ago
parent
commit
0ba5f33f73
  1. 2
      src/Magnum/Trade/MeshData.cpp
  2. 2
      src/Magnum/Trade/Test/MeshDataTest.cpp

2
src/Magnum/Trade/MeshData.cpp

@ -140,7 +140,7 @@ MeshData::MeshData(const MeshPrimitive primitive, Containers::Array<char>&& inde
if(attribute._isOffsetOnly) {
const std::size_t size = attribute._data.offset + (_vertexCount - 1)*attribute._stride + typeSize;
CORRADE_ASSERT(!_vertexCount || size <= _vertexData.size(),
"Trade::MeshData: offset attribute" << i << "spans" << size << "bytes but passed vertexData array has only" << _vertexData.size(), );
"Trade::MeshData: offset-only attribute" << i << "spans" << size << "bytes but passed vertexData array has only" << _vertexData.size(), );
} else {
const void* const begin = static_cast<const char*>(attribute._data.pointer);
const void* const end = static_cast<const char*>(attribute._data.pointer) + (_vertexCount - 1)*attribute._stride + typeSize;

2
src/Magnum/Trade/Test/MeshDataTest.cpp

@ -1665,7 +1665,7 @@ void MeshDataTest::constructAttributeNotContained() {
"Trade::MeshData: attribute 0 [0xbadda9:0xbaddc9] is not contained in passed vertexData array [0xbadda9:0xbaddc1]\n"
"Trade::MeshData: attribute 1 [0xdead:0xdec5] is not contained in passed vertexData array [0xbadda9:0xbaddc1]\n"
"Trade::MeshData: attribute 0 [0xbadda9:0xbaddc1] is not contained in passed vertexData array [0x0:0x0]\n"
"Trade::MeshData: offset attribute 0 spans 25 bytes but passed vertexData array has only 24\n");
"Trade::MeshData: offset-only attribute 0 spans 25 bytes but passed vertexData array has only 24\n");
}
void MeshDataTest::constructInconsitentVertexCount() {

Loading…
Cancel
Save