diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-01-16 16:17:48 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2023-01-16 16:25:00 +0100 |
commit | d872a78b6a9103a2e23c6a1a3addc7c53e0eeeb8 (patch) | |
tree | 9f789f81bfca1fb9eb9887f6c73d9ed0b377d1b3 | |
parent | 48ec5ecccd5eafce2f5f1cea80bfb0601d3d688d (diff) | |
download | justbuild-d872a78b6a9103a2e23c6a1a3addc7c53e0eeeb8.tar.gz |
just-mr fetch: fix internal archive description
The absent value for an optional string is std::nullopt, not
the empty string.
-rw-r--r-- | src/other_tools/just_mr/main.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/other_tools/just_mr/main.cpp b/src/other_tools/just_mr/main.cpp index c86e1583..d63448d7 100644 --- a/src/other_tools/just_mr/main.cpp +++ b/src/other_tools/just_mr/main.cpp @@ -667,16 +667,16 @@ void DefaultReachableRepositories( { repo_desc_content->get()->String(), /* content */ repo_desc_distfile->IsString() - ? repo_desc_distfile->String() - : "", /* distfile */ + ? std::make_optional(repo_desc_distfile->String()) + : std::nullopt, /* distfile */ repo_desc_fetch->get()->String(), /* fetch_url */ repo_desc_sha256->IsString() - ? repo_desc_sha256->String() - : "", /* sha256 */ + ? std::make_optional(repo_desc_sha256->String()) + : std::nullopt, /* sha256 */ repo_desc_sha512->IsString() - ? repo_desc_sha512->String() - : "" /* sha512 */ - }, /* archive */ + ? std::make_optional(repo_desc_sha512->String()) + : std::nullopt /* sha512 */ + }, /* archive */ repo_type_str, subdir.empty() ? "." : subdir.string()}; // add to list |