From e5f211ecf7f8024ffcb71ea16bcd686601765d3e Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 16 Dec 2024 17:50:43 -0600 Subject: [PATCH] Use string directly --- src/archive.cpp | 19 ++++++++++--------- src/archive.h | 18 +++++++++--------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/archive.cpp b/src/archive.cpp index 61a770a..a5f76a7 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -155,15 +155,15 @@ std::generator archive::getAllPermissions() const { } std::generator archive::getPublishedSources( - const std::string& component_name, - const std::string& created_since_date, + const std::string component_name, + const std::string created_since_date, std::optional ds, const bool exact_match, const bool order_by_date, - const std::string& pocket, - const std::string& source_name, - const std::string& status, - const std::string& version + const std::string pocket, + const std::string source_name, + const std::string status, + const std::string version ) const { std::map params = { {"exact_match", exact_match ? "true" : ""}, @@ -245,11 +245,12 @@ std::optional archive::getBuildCounters(bool include_needsbuild) return nlohmann::json::parse(response.value()); } -std::generator archive::getBuildRecords(const std::string& build_state, - const std::string& pocket, - const std::string& source_name) const { +std::generator archive::getBuildRecords(const std::string build_state, + const std::string pocket, + const std::string source_name) const { std::map params; params["ws.op"] = "getBuildRecords"; + std::cout << "!!!!!!!! " << build_state << std::endl; if(!build_state.empty()) params["build_state"] = build_state; if(!pocket.empty()) params["pocket"] = pocket; if(!source_name.empty()) params["source_name"] = source_name; diff --git a/src/archive.h b/src/archive.h index 5f6fdbc..fa4d356 100644 --- a/src/archive.h +++ b/src/archive.h @@ -79,15 +79,15 @@ public: std::string web_link; std::generator getPublishedSources( - const std::string& component_name = "", - const std::string& created_since_date = "", + const std::string component_name = "", + const std::string created_since_date = "", std::optional ds = std::nullopt, const bool exact_match = false, const bool order_by_date = false, - const std::string& pocket = "", - const std::string& source_name = "", - const std::string& status = "", - const std::string& version = "" + const std::string pocket = "", + const std::string source_name = "", + const std::string status = "", + const std::string version = "" ) const; std::generator getAllPermissions() const; @@ -99,9 +99,9 @@ public: bool strict_component = false) const; std::optional getArchiveDependency(const std::string& dependency_link) const; std::optional getBuildCounters(bool include_needsbuild = false) const; - std::generator getBuildRecords(const std::string& build_state = "", - const std::string& pocket = "", - const std::string& source_name = "") const; + std::generator getBuildRecords(const std::string build_state = "", + const std::string pocket = "", + const std::string source_name = "") const; std::optional getBuildSummariesForSourceIds(const std::vector& source_ids) const; std::generator getComponentsForQueueAdmin(const std::string& person_link) const; std::optional getNamedAuthToken(const std::string& name) const;