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:
2010-11-23 21:59:52 +00:00
parent 8f94937ed1
commit 33c86d494b
3 changed files with 21 additions and 8 deletions

View File

@@ -87,6 +87,7 @@ public:
bool Find(const std::string & key, Function ** fun);
bool Find(const std::wstring & key, Function ** fun);
void Clear();
size_t Size();
private:
@@ -245,6 +246,12 @@ void Functions<StreamType>::Clear()
}
template<class StreamType>
size_t Functions<StreamType>::Size()
{
return functions_tab.size();
}
} // namespace Ezc