Perhaps an std::move will help?
This commit is contained in:
parent
dc3c8a05c1
commit
4268ad5f2c
@ -15,6 +15,7 @@
|
||||
|
||||
#include "source_package_publishing_history.h"
|
||||
#include "binary_package_publishing_history.h"
|
||||
#include "distro_series.h"
|
||||
#include "build.h"
|
||||
#include "launchpad.h"
|
||||
#include <iostream>
|
||||
@ -25,7 +26,7 @@ source_package_publishing_history::source_package_publishing_history()
|
||||
source_package_version(""),
|
||||
self_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;
|
||||
|
||||
@ -37,7 +38,7 @@ source_package_publishing_history::source_package_publishing_history()
|
||||
|
||||
if (ds) {
|
||||
ds->set_lp(lp);
|
||||
_distro_series = std::make_optional(ds.value());
|
||||
_distro_series = std::make_optional(std::move(ds.value()));
|
||||
return ds;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user