Commit 129fc00e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Artist: Make name immutable

parent 5d496969
......@@ -41,15 +41,15 @@ int64_t Artist::*const Artist::Table::PrimaryKey = &Artist::m_id;
Artist::Artist( MediaLibraryPtr ml, sqlite::Row& row )
: m_ml( ml )
, m_id( row.extract<decltype(m_id)>() )
, m_name( row.extract<decltype(m_name)>() )
, m_shortBio( row.extract<decltype(m_shortBio)>() )
, m_thumbnailId( row.extract<decltype(m_thumbnailId)>() )
, m_nbAlbums( row.extract<decltype(m_nbAlbums)>() )
, m_nbTracks( row.extract<decltype(m_nbTracks)>() )
, m_mbId( row.extract<decltype(m_mbId)>() )
, m_isPresent( row.extract<decltype(m_isPresent)>() )
{
row >> m_id
>> m_name
>> m_shortBio
>> m_thumbnailId
>> m_nbAlbums
>> m_nbTracks
>> m_mbId
>> m_isPresent;
}
Artist::Artist( MediaLibraryPtr ml, const std::string& name )
......
......@@ -86,13 +86,13 @@ private:
private:
MediaLibraryPtr m_ml;
int64_t m_id;
std::string m_name;
const std::string m_name;
std::string m_shortBio;
int64_t m_thumbnailId;
unsigned int m_nbAlbums;
unsigned int m_nbTracks;
bool m_isPresent;
std::string m_mbId;
bool m_isPresent;
mutable Cache<std::shared_ptr<Thumbnail>> m_thumbnail;
......
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