Several optimizations that came from KCacheGrind / calltree fun.

Basically they fall into the categories:
- Don't convert things before you need to
- When you do, use more effecient copy constructors / assignment operators
  (i.e. when copying prefer memcpy to a for loop and when that's not possible
  use an iterator instead of operator[])


git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@301896 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
This commit is contained in:
Scott Wheeler
2004-04-07 06:00:05 +00:00
parent 1bc8909bba
commit 15d3c3c71a
4 changed files with 66 additions and 30 deletions

View File

@ -252,7 +252,7 @@ bool FrameFactory::updateFrame(Frame::Header *header) const
// private members
////////////////////////////////////////////////////////////////////////////////
void FrameFactory::convertFrame(const ByteVector &from, const ByteVector &to,
void FrameFactory::convertFrame(const char *from, const char *to,
Frame::Header *header) const
{
if(header->frameID() != from)

View File

@ -124,7 +124,7 @@ namespace TagLib {
* \a to. If the frame matches the \a from pattern and converts the frame
* ID in the \a header or simply does nothing if the frame ID does not match.
*/
void convertFrame(const ByteVector &from, const ByteVector &to,
void convertFrame(const char *from, const char *to,
Frame::Header *header) const;
static FrameFactory *factory;