fixed: performance (memcpy used too often)
in some places there were reserve() method used (on std::wstring/std::string objects)
especially in AssignString() methods
if we add a new string we should check the new size
and only call reserve() if the new size will be greater than existing one
(plus some constant)
added: Functions<>::Size() method
git-svn-id: svn://ttmath.org/publicrep/ezc/trunk@327 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
+4
-4
@@ -279,7 +279,7 @@ void Pattern::SetCommentary(const std::wstring & com_start, const std::wstring &
|
||||
void Pattern::CreateMsg(std::wstring & out, const char * type, const char * arg)
|
||||
{
|
||||
out = commentary_start;
|
||||
out += L"EZC: ";
|
||||
out += L"Ezc: ";
|
||||
AssignString(type, out, false);
|
||||
|
||||
if( arg )
|
||||
@@ -295,7 +295,7 @@ void Pattern::CreateMsg(std::wstring & out, const char * type, const char * arg)
|
||||
void Pattern::CreateMsg(std::wstring & out, const wchar_t * type, const wchar_t * arg)
|
||||
{
|
||||
out = commentary_start;
|
||||
out += L"EZC: ";
|
||||
out += L"Ezc: ";
|
||||
out += type;
|
||||
|
||||
if( arg )
|
||||
@@ -412,7 +412,7 @@ bool Pattern::ReadFileFromDir(const std::wstring & dir, const wchar_t * name, st
|
||||
ReadFile(file, result);
|
||||
|
||||
#ifdef EZC_USE_WINIX_LOGGER
|
||||
log << log3 << "EZC: read pattern: " << afile_name << logend;
|
||||
log << log3 << "Ezc: read pattern: " << afile_name << logend;
|
||||
#endif
|
||||
|
||||
file_name.clear();
|
||||
@@ -932,7 +932,7 @@ void Pattern::CreateTreeReadIncludeSkipAllowFlag(Item & item)
|
||||
if( include_level > include_level_max )
|
||||
{
|
||||
#ifdef EZC_USE_WINIX_LOGGER
|
||||
log << log1 << "EZC: \"include\" directive has reached the maximum level" << logend;
|
||||
log << log1 << "Ezc: \"include\" directive has reached the maximum level" << logend;
|
||||
#endif
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user