Commit 07aba0d4 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Label: Make name imutable

parent 3ec7938e
......@@ -42,9 +42,9 @@ int64_t Label::* const Label::Table::PrimaryKey = &Label::m_id;
Label::Label(MediaLibraryPtr ml, sqlite::Row& row )
: m_ml( ml )
, m_id( row.extract<decltype(m_id)>() )
, m_name( row.extract<decltype (m_name)>() )
{
row >> m_id
>> m_name;
}
Label::Label( MediaLibraryPtr ml, const std::string& name )
......
......@@ -59,7 +59,7 @@ class Label : public ILabel, public DatabaseHelpers<Label>
private:
MediaLibraryPtr m_ml;
int64_t m_id;
std::string m_name;
const std::string m_name;
friend struct Label::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