From d872a78b6a9103a2e23c6a1a3addc7c53e0eeeb8 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 16 Jan 2023 16:17:48 +0100 Subject: just-mr fetch: fix internal archive description The absent value for an optional string is std::nullopt, not the empty string. --- src/other_tools/just_mr/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/other_tools/just_mr/main.cpp') 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 -- cgit v1.2.3