Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/objfile.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/model/objfile.cc b/src/model/objfile.cc
index 56d3692..489da2c 100644
--- a/src/model/objfile.cc
+++ b/src/model/objfile.cc
@@ -121,7 +121,7 @@ bool OBJFile::read()
con_warn << objfile_name << " invalid material definition at line " << index_line << std::endl;
- } else if( word.compare("v") == 0) { /* New wertex */
+ } else if( word.compare("v") == 0) { /* new wertex */
float x, y, z;
line >> x >> y >> z;
@@ -145,7 +145,7 @@ bool OBJFile::read()
obj_normallist[obj_normalcount] = nm;
obj_normalcount++;
- } else if( word.compare("f") == 0) { /* Face/Polygon */
+ } else if( word.compare("f") == 0) { /* face/polygon */
size_t v[4];
size_t uv[4];
size_t vn[4];
@@ -167,9 +167,7 @@ bool OBJFile::read()
have_uv[i] = 0;
std::string point;
- tmp >> point;
-
- if(point.compare(" ") == 0) //bordercase for space at end of face definition
+ if (!(tmp >> point)) // bordercase for space at end of face definition
continue;
for(size_t c=0; c<point.length(); c++) {