diff options
author | Tor Egge <Tor.Egge@oath.com> | 2018-04-04 09:55:00 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-04-04 09:55:00 +0000 |
commit | f4b8ab7173c4d8e677d7f9c4e90e4863fae1ae82 (patch) | |
tree | 55d2dc111a0b66ea1b37b2d34adfe6b2dcf04ca9 /document | |
parent | 9cb58e26bc840decdbd577e80df42f9c2188c459 (diff) |
Specify deleter directly to shared pointer constructor.
Diffstat (limited to 'document')
-rw-r--r-- | document/src/vespa/document/repo/document_type_repo_factory.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/document/src/vespa/document/repo/document_type_repo_factory.cpp b/document/src/vespa/document/repo/document_type_repo_factory.cpp index 61a515f5566..8224d0f2c9a 100644 --- a/document/src/vespa/document/repo/document_type_repo_factory.cpp +++ b/document/src/vespa/document/repo/document_type_repo_factory.cpp @@ -42,9 +42,8 @@ DocumentTypeRepoFactory::make(const DocumenttypesConfig &config) } } auto repoConfig = std::make_unique<const DocumenttypesConfig>(config); - auto repoup1 = std::make_unique<DocumentTypeRepo>(*repoConfig); - auto repoup2 = std::unique_ptr<DocumentTypeRepo, Deleter>(repoup1.release(), Deleter()); - auto repo = std::shared_ptr<const DocumentTypeRepo>(std::move(repoup2)); + auto repoup = std::make_unique<DocumentTypeRepo>(*repoConfig); + auto repo = std::shared_ptr<const DocumentTypeRepo>(repoup.release(), Deleter()); _repos.emplace(repo.get(), DocumentTypeRepoEntry(repo, std::move(repoConfig))); return repo; } |