From 5e0a5b39e013ad6b3eb326d0c963d60172d343de Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 10 May 2005 16:13:37 +0000 Subject: [PATCH] Added tab to space converted to .obj plugin --- src/osgPlugins/obj/obj.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/osgPlugins/obj/obj.cpp b/src/osgPlugins/obj/obj.cpp index eb1cc9e9c..ee5c1dc42 100644 --- a/src/osgPlugins/obj/obj.cpp +++ b/src/osgPlugins/obj/obj.cpp @@ -27,6 +27,7 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE) if (LINE_SIZE<1) return false; bool eatWhiteSpaceAtStart = true; + bool changeTabsToSpaces = true; char* ptr = line; char* end = line+LINE_SIZE-1; @@ -97,6 +98,15 @@ bool Model::readline(std::istream& fin, char* line, const int LINE_SIZE) *ptr = 0; + if (changeTabsToSpaces) + { + + for(ptr = line; *ptr != 0; ++ptr) + { + if (*ptr == '\t') *ptr=' '; + } + } + return true; }