mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Replace _IRR_DEBUG_BREAK_IF
with assertions
This commit is contained in:
parent
2f464843cb
commit
5f1ff453c9
22 changed files with 96 additions and 91 deletions
|
@ -9,6 +9,8 @@
|
|||
#include "SAnimatedMesh.h"
|
||||
#include "os.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
|
@ -118,14 +120,14 @@ void CMeshManipulator::recalculateNormals(scene::IMesh *mesh, bool smooth, bool
|
|||
template <typename T>
|
||||
void copyVertices(const scene::IVertexBuffer *src, scene::CVertexBuffer<T> *dst)
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(T::getType() != src->getType());
|
||||
assert(T::getType() == src->getType());
|
||||
auto *data = static_cast<const T*>(src->getData());
|
||||
dst->Data.assign(data, data + src->getCount());
|
||||
}
|
||||
|
||||
static void copyIndices(const scene::IIndexBuffer *src, scene::SIndexBuffer *dst)
|
||||
{
|
||||
_IRR_DEBUG_BREAK_IF(src->getType() != video::EIT_16BIT);
|
||||
assert(src->getType() == video::EIT_16BIT);
|
||||
auto *data = static_cast<const u16*>(src->getData());
|
||||
dst->Data.assign(data, data + src->getCount());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue