diff options
author | Ilya Zhuravlev <zhuravlevilya@ya.ru> | 2012-12-20 21:19:49 +0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-03-11 19:08:39 -0400 |
commit | 6a1670dbc31cc0e44178bbd9ad34ff0d5981a060 (patch) | |
tree | ce32cd4be20e9be30367f2ad25d9dae6a0482898 /src/mapblock_mesh.cpp | |
parent | e204bedf1d781e43b8caa334a99319efc5b7ce46 (diff) | |
download | minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.gz minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.bz2 minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.zip |
Migrate to STL containers/algorithms.
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r-- | src/mapblock_mesh.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index f4d57922a..d098065f8 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -445,7 +445,7 @@ struct FastFace }; static void makeFastFace(TileSpec tile, u16 li0, u16 li1, u16 li2, u16 li3, - v3f p, v3s16 dir, v3f scale, u8 light_source, core::array<FastFace> &dest) + v3f p, v3s16 dir, v3f scale, u8 light_source, std::vector<FastFace> &dest) { FastFace face; @@ -745,7 +745,7 @@ static void updateFastFaceRow( v3f translate_dir_f, v3s16 face_dir, v3f face_dir_f, - core::array<FastFace> &dest) + std::vector<FastFace> &dest) { v3s16 p = startpos; @@ -897,7 +897,7 @@ static void updateFastFaceRow( } static void updateAllFastFaceRows(MeshMakeData *data, - core::array<FastFace> &dest) + std::vector<FastFace> &dest) { /* Go through every y,z and get top(y+) faces in rows of x+ @@ -962,7 +962,7 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data): // 24-155ms for MAP_BLOCKSIZE=32 (NOTE: probably outdated) //TimeTaker timer1("MapBlockMesh()"); - core::array<FastFace> fastfaces_new; + std::vector<FastFace> fastfaces_new; /* We are including the faces of the trailing edges of the block. @@ -1124,8 +1124,8 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data): m_mesh->addMeshBuffer(buf); // Mesh grabbed it buf->drop(); - buf->append(p.vertices.pointer(), p.vertices.size(), - p.indices.pointer(), p.indices.size()); + buf->append(&p.vertices[0], p.vertices.size(), + &p.indices[0], p.indices.size()); } /* |