Minor cosmetics changes (more C++-like)

This commit is contained in:
Olivier Teulière 2012-10-24 15:23:59 +02:00
parent 08c3f2ccb2
commit 8858c54656
3 changed files with 4 additions and 6 deletions

View file

@ -142,10 +142,11 @@ Tile Bag::selectRandomTile(unsigned int total,
}
void Bag::operator=(const Bag &iOther)
Bag & Bag::operator=(const Bag &iOther)
{
m_tilesMap = iOther.m_tilesMap;
m_ntiles = iOther.m_ntiles;
return *this;
}

View file

@ -75,7 +75,7 @@ public:
*/
Tile selectRandomConsonant() const;
void operator=(const Bag &iOther);
Bag & operator=(const Bag &iOther);
/// Convenience getter on the dictionary
const Dictionary & getDic() const { return m_dic; }

View file

@ -102,10 +102,7 @@ wchar_t *rl_gets()
wline_read = new wchar_t[len + 1];
mbstowcs(wline_read, line_read, len + 1);
if (line_read)
{
free(line_read);
}
free(line_read);
#else
if (!cin.good())
return NULL;