Use std::make_unique
This commit is contained in:
@@ -45,7 +45,7 @@ class CollectionBackendTest : public ::testing::Test {
|
||||
protected:
|
||||
void SetUp() override {
|
||||
database_.reset(new MemoryDatabase(nullptr));
|
||||
backend_.reset(new CollectionBackend);
|
||||
backend_ = std::make_unique<CollectionBackend>();
|
||||
backend_->Init(database_.get(), Song::Source_Collection, SCollection::kSongsTable, SCollection::kDirsTable, SCollection::kSubdirsTable, SCollection::kFtsTable);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ class SongPlaylistItemTest : public ::testing::TestWithParam<const char*> {
|
||||
song_.Init("Title", "Artist", "Album", 123);
|
||||
song_.set_url(QUrl::fromLocalFile(absolute_file_name_));
|
||||
|
||||
item_.reset(new SongPlaylistItem(song_));
|
||||
item_ = std::make_unique<SongPlaylistItem>(song_);
|
||||
|
||||
if (!absolute_file_name_.startsWith('/'))
|
||||
absolute_file_name_.prepend('/');
|
||||
|
||||
Reference in New Issue
Block a user