diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2010-03-25 11:48:31 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2010-03-25 11:48:31 +0300 |
commit | 2ae418e0a87dff7f259792434615caaabfe8541f (patch) | |
tree | 53eb68b25832094838eebfcdb332b01b3dc02394 /source/gameengine/Rasterizer | |
parent | 33f880e8666e9bb0ed954fccb82bc23255a97868 (diff) |
Fix compilation error in MinGW with my last commit.
Diffstat (limited to 'source/gameengine/Rasterizer')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp index 6f99d54e8cc..12a255b4e4e 100644 --- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp +++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_ListRasterizer.cpp @@ -25,8 +25,8 @@ RAS_ListSlot::RAS_ListSlot(RAS_ListRasterizer* rasty) : KX_ListSlot(), m_list(0), m_flag(LIST_MODIFY|LIST_CREATE), - m_rasty(rasty), - m_matnr(0) + m_matnr(0), + m_rasty(rasty) { } @@ -166,24 +166,25 @@ RAS_ListSlot* RAS_ListRasterizer::FindOrAdd(RAS_MeshSlot& ms) // that means that we draw based on derived mesh, a display list is possible // Note that we come here only for static derived mesh int matnr = ms.m_bucket->GetPolyMaterial()->GetMaterialIndex(); + RAS_ListSlot* nullSlot = NULL; RAS_ListSlots *listVector; RAS_DerivedMeshLists::iterator it = mDerivedMeshLists.find(ms.m_pDerivedMesh); if(it == mDerivedMeshLists.end()) { - listVector = new RAS_ListSlots(matnr+4, NULL); + listVector = new RAS_ListSlots(matnr+4, nullSlot); localSlot = new RAS_ListSlot(this); localSlot->m_flag |= LIST_DERIVEDMESH; localSlot->m_matnr = matnr; - (*listVector)[matnr] = localSlot; + listVector->at(matnr) = localSlot; mDerivedMeshLists.insert(std::pair<DerivedMesh*, RAS_ListSlots*>(ms.m_pDerivedMesh, listVector)); } else { listVector = it->second; if (listVector->size() <= matnr) - listVector->resize(matnr+4, NULL); + listVector->resize(matnr+4, nullSlot); if ((localSlot = listVector->at(matnr)) == NULL) { localSlot = new RAS_ListSlot(this); localSlot->m_flag |= LIST_DERIVEDMESH; localSlot->m_matnr = matnr; - (*listVector)[matnr] = localSlot; + listVector->at(matnr) = localSlot; } else { localSlot->AddRef(); } |