Commit 8a3e3bbe authored by Alexandre Fernandez's avatar Alexandre Fernandez Committed by Hugo Beauzée-Luyssen

Cosmetic: Group references with rest of the type to unify coding style

Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 879464c7
......@@ -64,17 +64,17 @@ int64_t Artist::id() const
return m_id;
}
const std::string &Artist::name() const
const std::string& Artist::name() const
{
return m_name;
}
const std::string &Artist::shortBio() const
const std::string& Artist::shortBio() const
{
return m_shortBio;
}
bool Artist::setShortBio(const std::string &shortBio)
bool Artist::setShortBio(const std::string& shortBio)
{
static const std::string req = "UPDATE " + policy::ArtistTable::Name
+ " SET shortbio = ? WHERE id_artist = ?";
......@@ -275,7 +275,7 @@ bool Artist::createDefaultArtists( sqlite::Connection* dbConnection )
return true;
}
std::shared_ptr<Artist> Artist::create( MediaLibraryPtr ml, const std::string &name )
std::shared_ptr<Artist> Artist::create( MediaLibraryPtr ml, const std::string& name )
{
auto artist = std::make_shared<Artist>( ml, name );
static const std::string req = "INSERT INTO " + policy::ArtistTable::Name +
......
......@@ -50,7 +50,7 @@ public:
Artist( MediaLibraryPtr ml, const std::string& name );
virtual int64_t id() const override;
virtual const std::string &name() const override;
virtual const std::string& name() const override;
virtual const std::string& shortBio() const override;
bool setShortBio( const std::string& shortBio );
virtual std::vector<AlbumPtr> albums( SortingCriteria sort, bool desc ) const override;
......
......@@ -257,7 +257,7 @@ std::vector<AudioTrackPtr> Media::audioTracks()
return AudioTrack::fetchAll<IAudioTrack>( m_ml, req, m_id );
}
const std::string &Media::thumbnail()
const std::string& Media::thumbnail()
{
return m_thumbnail;
}
......@@ -480,7 +480,7 @@ void Media::setType( Type type )
m_changed = true;
}
const std::string &Media::title() const
const std::string& Media::title() const
{
return m_title;
}
......@@ -505,7 +505,7 @@ bool Media::setTitle( const std::string& title )
return true;
}
void Media::setTitleBuffered( const std::string &title )
void Media::setTitleBuffered( const std::string& title )
{
if ( m_title == title )
return;
......
......@@ -82,7 +82,7 @@ class Media : public IMedia, public DatabaseHelpers<Media, policy::MediaTable>
// shall be well-formed, and private constructor would prevent that.
// There might be a way with a user-defined allocator, but we'll see that later...
Media( MediaLibraryPtr ml , sqlite::Row& row );
Media( MediaLibraryPtr ml, const std::string &title, Type type);
Media( MediaLibraryPtr ml, const std::string& title, Type type);
static std::shared_ptr<Media> create( MediaLibraryPtr ml, Type type, const std::string& fileName );
static bool createTable( sqlite::Connection* connection );
......
......@@ -986,7 +986,7 @@ std::shared_ptr<factory::IFileSystem> MediaLibrary::fsFactoryForMrl( const std::
return nullptr;
}
void MediaLibrary::discover( const std::string &entryPoint )
void MediaLibrary::discover( const std::string& entryPoint )
{
if ( m_discovererWorker != nullptr )
m_discovererWorker->discover( entryPoint );
......
......@@ -94,7 +94,7 @@ const std::string& VideoTrack::description() const
return m_description;
}
std::shared_ptr<VideoTrack> VideoTrack::create( MediaLibraryPtr ml, const std::string &codec, unsigned int width,
std::shared_ptr<VideoTrack> VideoTrack::create( MediaLibraryPtr ml, const std::string& codec, unsigned int width,
unsigned int height, float fps, int64_t mediaId,
const std::string& language, const std::string& description )
{
......
......@@ -180,7 +180,7 @@ class DatabaseHelpers
}
template <typename INTF, typename... Args>
static std::vector<std::shared_ptr<INTF>> fetchAll( MediaLibraryPtr ml, const std::string &req, Args&&... args )
static std::vector<std::shared_ptr<INTF>> fetchAll( MediaLibraryPtr ml, const std::string& req, Args&&... args )
{
try
{
......
......@@ -33,7 +33,7 @@ namespace medialibrary
namespace sqlite
{
Connection::Connection( const std::string &dbPath )
Connection::Connection( const std::string& dbPath )
: m_dbPath( dbPath )
, m_readLock( m_contextLock )
, m_writeLock( m_contextLock )
......
......@@ -66,7 +66,7 @@ FsDiscoverer::FsDiscoverer( std::shared_ptr<factory::IFileSystem> fsFactory, Med
{
}
bool FsDiscoverer::discover( const std::string &entryPoint )
bool FsDiscoverer::discover( const std::string& entryPoint )
{
LOG_INFO( "Adding to discovery list: ", entryPoint );
......
......@@ -42,7 +42,7 @@ class FsDiscoverer : public IDiscoverer
{
public:
FsDiscoverer( std::shared_ptr<factory::IFileSystem> fsFactory, MediaLibrary* ml , IMediaLibraryCb* cb, std::unique_ptr<prober::IProbe> probe );
virtual bool discover(const std::string &entryPoint ) override;
virtual bool discover(const std::string& entryPoint ) override;
virtual bool reload() override;
virtual bool reload( const std::string& entryPoint ) override;
......
......@@ -44,7 +44,7 @@ namespace medialibrary
namespace fs
{
File::File( const std::string &filePath )
File::File( const std::string& filePath )
: CommonFile( utils::file::toMrl( filePath ) )
{
struct _stat s;
......
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