From 1a943c69ba8ede33fd1c8596bfe835f220ddd6b7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 11 Apr 2003 18:57:35 +0000 Subject: [PATCH] Convertex a std::copy() into a for loop to get round compile problems under OSX. --- src/osgPlugins/osgText/IO_Text.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/osgText/IO_Text.cpp b/src/osgPlugins/osgText/IO_Text.cpp index b0498a6b9..e1c5161b7 100644 --- a/src/osgPlugins/osgText/IO_Text.cpp +++ b/src/osgPlugins/osgText/IO_Text.cpp @@ -300,7 +300,8 @@ bool Text_writeLocalData(const osg::Object &obj, osgDB::Output &fw) // text const osgText::String& textstring = text.getText(); bool isACString = true; - for(osgText::String::const_iterator itr=textstring.begin(); + osgText::String::const_iterator itr; + for(itr=textstring.begin(); itr!=textstring.end() && isACString; ++itr) { @@ -309,7 +310,16 @@ bool Text_writeLocalData(const osg::Object &obj, osgDB::Output &fw) if (isACString) { std::string str; - std::copy(textstring.begin(),textstring.end(),std::back_inserter(str)); + + for(itr=textstring.begin(); + itr!=textstring.end(); + ++itr) + { + str.push_back((char)*itr); + } + + //std::copy(textstring.begin(),textstring.end(),std::back_inserter(str)); + fw.indent() << "text " << fw.wrapString(str) << std::endl; } else