+ 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 @brief A destructor
*/ */
~CTPP2TextLoader() throw(); ~CTPP2TextLoader() throw();
private: private:
/** Template body */ std::string templateText;
CHAR_P sTemplate;
/** Template size */
UINT_32 iTemplateSize;
}; };
} // namespace CTPP } // namespace CTPP

View File

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