OctoPrint WIP: Fix build

This commit is contained in:
Vojtech Kral 2018-12-12 13:35:00 +01:00
parent 2350fb62b9
commit 2eaca46b75
3 changed files with 124 additions and 1 deletions

View file

@ -43,10 +43,24 @@ struct PrintHostJob
std::unique_ptr<PrintHost> printhost;
PrintHostJob() {}
PrintHostJob(const PrintHostJob&) = delete;
PrintHostJob(PrintHostJob &&other)
: upload_data(std::move(other.upload_data))
, printhost(std::move(other.printhost))
{}
PrintHostJob(DynamicPrintConfig *config)
: printhost(PrintHost::get_print_host(config))
{}
PrintHostJob& operator=(const PrintHostJob&) = delete;
PrintHostJob& operator=(PrintHostJob &&other)
{
upload_data = std::move(other.upload_data);
printhost = std::move(other.printhost);
return *this;
}
bool empty() const { return !printhost; }
operator bool() const { return !!printhost; }
};