Try some more direct type fun
This commit is contained in:
parent
61d95127b6
commit
0851fbeebc
@ -17,6 +17,7 @@
|
||||
#include "binary_package_publishing_history.h"
|
||||
#include "build.h"
|
||||
#include "launchpad.h"
|
||||
#include "distro_series.h"
|
||||
#include <iostream>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
@ -26,7 +27,7 @@ source_package_publishing_history::source_package_publishing_history()
|
||||
self_link(""),
|
||||
distro_series_link(""),
|
||||
lp(nullptr),
|
||||
distro_series([this]() -> std::optional<class distro_series> {
|
||||
distro_series([this]() -> std::optional<::distro_series> {
|
||||
if (distro_series_link.empty()) return std::nullopt;
|
||||
if (_distro_series) return _distro_series;
|
||||
|
||||
@ -34,7 +35,7 @@ source_package_publishing_history::source_package_publishing_history()
|
||||
if (!response) return std::nullopt;
|
||||
|
||||
auto data = nlohmann::json::parse(response.value());
|
||||
auto ds = distro_series::parse(data.dump());
|
||||
auto ds = ::distro_series::parse(data.dump());
|
||||
|
||||
if (ds) {
|
||||
ds->set_lp(lp);
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
void parse_json(const std::string& json_data);
|
||||
|
||||
std::generator<build> getBuilds() const;
|
||||
lazy_optional<class distro_series, std::function<std::optional<class distro_series>()>> distro_series;
|
||||
lazy_optional<::distro_series, std::function<std::optional<::distro_series>()>> distro_series;
|
||||
std::generator<binary_package_publishing_history> getPublishedBinaries(bool active_binaries_only = false) const;
|
||||
|
||||
bool requestDeletion(const std::string& removal_comment = "");
|
||||
@ -58,7 +58,7 @@ public:
|
||||
|
||||
private:
|
||||
launchpad* lp;
|
||||
std::optional<class distro_series> _distro_series = std::nullopt;
|
||||
std::optional<::distro_series> _distro_series = std::nullopt;
|
||||
};
|
||||
|
||||
#endif // SOURCE_PACKAGE_PUBLISHING_HISTORY
|
||||
|
Loading…
x
Reference in New Issue
Block a user