Replaced BOOST_FOREACH with c++11 ranged for loops
This commit is contained in:
@@ -51,7 +51,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <assimp/Exporter.hpp>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
@@ -217,7 +216,7 @@ void ObjExporter :: WriteGeometryFile()
|
||||
// write vertex positions
|
||||
vpMap.getVectors(vp);
|
||||
mOutput << "# " << vp.size() << " vertex positions" << endl;
|
||||
BOOST_FOREACH(const aiVector3D& v, vp) {
|
||||
for(const aiVector3D& v : vp) {
|
||||
mOutput << "v " << v.x << " " << v.y << " " << v.z << endl;
|
||||
}
|
||||
mOutput << endl;
|
||||
@@ -225,7 +224,7 @@ void ObjExporter :: WriteGeometryFile()
|
||||
// write uv coordinates
|
||||
vtMap.getVectors(vt);
|
||||
mOutput << "# " << vt.size() << " UV coordinates" << endl;
|
||||
BOOST_FOREACH(const aiVector3D& v, vt) {
|
||||
for(const aiVector3D& v : vt) {
|
||||
mOutput << "vt " << v.x << " " << v.y << " " << v.z << endl;
|
||||
}
|
||||
mOutput << endl;
|
||||
@@ -233,22 +232,22 @@ void ObjExporter :: WriteGeometryFile()
|
||||
// write vertex normals
|
||||
vnMap.getVectors(vn);
|
||||
mOutput << "# " << vn.size() << " vertex normals" << endl;
|
||||
BOOST_FOREACH(const aiVector3D& v, vn) {
|
||||
for(const aiVector3D& v : vn) {
|
||||
mOutput << "vn " << v.x << " " << v.y << " " << v.z << endl;
|
||||
}
|
||||
mOutput << endl;
|
||||
|
||||
// now write all mesh instances
|
||||
BOOST_FOREACH(const MeshInstance& m, meshes) {
|
||||
for(const MeshInstance& m : meshes) {
|
||||
mOutput << "# Mesh \'" << m.name << "\' with " << m.faces.size() << " faces" << endl;
|
||||
if (!m.name.empty()) {
|
||||
mOutput << "g " << m.name << endl;
|
||||
}
|
||||
mOutput << "usemtl " << m.matname << endl;
|
||||
|
||||
BOOST_FOREACH(const Face& f, m.faces) {
|
||||
for(const Face& f : m.faces) {
|
||||
mOutput << f.kind << ' ';
|
||||
BOOST_FOREACH(const FaceVertex& fv, f.indices) {
|
||||
for(const FaceVertex& fv : f.indices) {
|
||||
mOutput << ' ' << fv.vp;
|
||||
|
||||
if (f.kind != 'p') {
|
||||
|
||||
Reference in New Issue
Block a user