summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_repo.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-05-26 15:06:49 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-06-06 09:55:17 +0200
commit3f41feb6e022a30cfce39ec40c7ffda46d75193d (patch)
tree24f8f8d5047582bd936b17d96e3f7b4b14020c79 /src/buildtool/file_system/git_repo.cpp
parente4214ea95874bdd5bc059d0892f90c09df7b664d (diff)
downloadjustbuild-3f41feb6e022a30cfce39ec40c7ffda46d75193d.tar.gz
style: Use designated initializers
This feature has been introduced with C++20.
Diffstat (limited to 'src/buildtool/file_system/git_repo.cpp')
-rw-r--r--src/buildtool/file_system/git_repo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp
index 968978b5..01db8269 100644
--- a/src/buildtool/file_system/git_repo.cpp
+++ b/src/buildtool/file_system/git_repo.cpp
@@ -1250,7 +1250,7 @@ auto GitRepo::ReadTreeData(std::string const& data,
-> std::optional<tree_entries_t> {
#ifndef BOOTSTRAP_BUILD_TOOL
try {
- InMemoryODBBackend b{kInMemoryODBParent};
+ InMemoryODBBackend b{.parent = kInMemoryODBParent};
auto cas = std::make_shared<GitCAS>();
if (auto raw_id =
is_hex_id ? FromHexString(id) : std::make_optional(id)) {
@@ -1285,7 +1285,7 @@ auto GitRepo::CreateShallowTree(tree_entries_t const& entries) noexcept
-> std::optional<std::pair<std::string, std::string>> {
#ifndef BOOTSTRAP_BUILD_TOOL
try {
- InMemoryODBBackend b{kInMemoryODBParent, &entries};
+ InMemoryODBBackend b{.parent = kInMemoryODBParent, .entries = &entries};
auto cas = std::make_shared<GitCAS>();
// create a GitCAS from a special-purpose in-memory object database.
git_odb* odb_ptr{nullptr};