Added tab to space converted to .obj plugin

This commit is contained in:
Robert Osfield 2005-05-10 16:13:37 +00:00
parent 1afd5e48a7
commit 5e0a5b39e0

View File

@ -27,6 +27,7 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
if (LINE_SIZE<1) return false; if (LINE_SIZE<1) return false;
bool eatWhiteSpaceAtStart = true; bool eatWhiteSpaceAtStart = true;
bool changeTabsToSpaces = true;
char* ptr = line; char* ptr = line;
char* end = line+LINE_SIZE-1; char* end = line+LINE_SIZE-1;
@ -97,6 +98,15 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE)
*ptr = 0; *ptr = 0;
if (changeTabsToSpaces)
{
for(ptr = line; *ptr != 0; ++ptr)
{
if (*ptr == '\t') *ptr=' ';
}
}
return true; return true;
} }