do not create various redundant temp strings in Song class

This commit is contained in:
Andrzej Rybczak
2008-11-21 18:57:51 +01:00
parent ab4159c1d6
commit 20a49f38cb
2 changed files with 21 additions and 11 deletions

View File

@@ -36,7 +36,7 @@ void DefineEmptyTags();
class Song
{
public:
Song() : itsHash(0), copyPtr(0), isStream(0), itsGetEmptyFields(0) { itsSong = mpd_newSong(); }
Song() : itsSlash(string::npos), itsHash(0), copyPtr(0), isStream(0), itsGetEmptyFields(0) { itsSong = mpd_newSong(); }
Song(mpd_Song *, bool = 0);
Song(const Song &);
~Song();
@@ -97,7 +97,7 @@ class Song
private:
mpd_Song *itsSong;
string itsNewName;
unsigned itsSlash;
size_t itsSlash;
long long itsHash;
bool copyPtr;
bool isStream;