Updates to Text for Sun Forte compilers.

This commit is contained in:
Robert Osfield
2003-03-05 09:08:11 +00:00
parent 424fad7234
commit 7b6eaa72f2
5 changed files with 69 additions and 65 deletions

View File

@@ -4,7 +4,7 @@
#include "FreeTypeLibrary.h"
class ReaderWriterFreeType : public osgDB::ReaderWriter
{;
{
public:
virtual const char* className() { return "FreeType Font Reader/Writer"; }

View File

@@ -114,7 +114,8 @@ bool Text_writeLocalData(const osg::Object &obj, osgDB::Output &fw)
}
if (isACString)
{
std::string str(textstring.begin(),textstring.end());
std::string str;
std::copy(textstring.begin(),textstring.end(),std::back_inserter(str));
fw.indent() << "text " << fw.wrapString(str) << std::endl;
}
else

View File

@@ -104,7 +104,7 @@ void Text::setText(const TextString& text)
void Text::setText(const std::string& text)
{
_text.clear();
_text.insert(_text.end(),text.begin(),text.end());
std::copy(text.begin(),text.end(),std::back_inserter(_text));
computeGlyphRepresentation();
}
@@ -140,7 +140,7 @@ void Text::setText(const wchar_t* text)
while (*endOfText) ++endOfText;
// pass it to the _text field.
_text.insert(_text.end(),text,endOfText);
std::copy(text,endOfText,std::back_inserter(_text));
}
computeGlyphRepresentation();
}