+ fix new CTPP2TextLoader class

This commit is contained in:
kelson42 2012-04-23 21:17:05 +00:00
parent 83d0f749f8
commit d4df7f095c
2 changed files with 6 additions and 8 deletions

View File

@ -81,11 +81,9 @@ public:
@brief A destructor
*/
~CTPP2TextLoader() throw();
private:
/** Template body */
CHAR_P sTemplate;
/** Template size */
UINT_32 iTemplateSize;
std::string templateText;
};
} // namespace CTPP

View File

@ -58,8 +58,7 @@ CTPP2SourceLoader * CTPP2TextLoader::Clone()
//
// Constructor
//
CTPP2TextLoader::CTPP2TextLoader(): sTemplate(NULL), iTemplateSize(0)
{
CTPP2TextLoader::CTPP2TextLoader() {
}
//
@ -67,6 +66,7 @@ CTPP2TextLoader::CTPP2TextLoader(): sTemplate(NULL), iTemplateSize(0)
//
INT_32 CTPP2TextLoader::LoadTemplate(CCHAR_P szTemplateName)
{
this->templateText = std::string(szTemplateName);
return 0;
}
@ -75,8 +75,8 @@ INT_32 CTPP2TextLoader::LoadTemplate(CCHAR_P szTemplateName)
//
CCHAR_P CTPP2TextLoader::GetTemplate(UINT_32 & iITemplateSize)
{
iITemplateSize = this->iTemplateSize;
return sTemplate;
iITemplateSize = this->templateText.size();
return this->templateText.data();
}
//