Commit 3ec7938e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Genre: Make name immutable

parent 47251cd2
......@@ -41,10 +41,10 @@ int64_t Genre::* const Genre::Table::PrimaryKey = &Genre::m_id;
Genre::Genre( MediaLibraryPtr ml, sqlite::Row& row )
: m_ml( ml )
, m_id( row.extract<decltype(m_id)>() )
, m_name( row.extract<decltype(m_name)>() )
, m_nbTracks( row.extract<decltype(m_nbTracks)>() )
{
row >> m_id
>> m_name
>> m_nbTracks;
}
Genre::Genre( MediaLibraryPtr ml, const std::string& name )
......
......@@ -68,7 +68,7 @@ private:
MediaLibraryPtr m_ml;
int64_t m_id;
std::string m_name;
const std::string m_name;
uint32_t m_nbTracks;
friend Genre::Table;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment