mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
fix compile errors
This commit is contained in:
parent
4daccb279c
commit
19694aa213
3 changed files with 19 additions and 15 deletions
|
@ -3,6 +3,7 @@
|
|||
#include <iostream>
|
||||
#include <optional>
|
||||
#include "serialise.hh"
|
||||
#include <sstream>
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
@ -16,6 +17,21 @@ BaseError & BaseError::addPrefix(const FormatOrString & fs)
|
|||
return *this;
|
||||
}
|
||||
|
||||
const string& BaseError::calcWhat() const
|
||||
{
|
||||
if (what_.has_value())
|
||||
return *what_;
|
||||
else {
|
||||
err.name = sname();
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << err;
|
||||
what_ = oss.str();
|
||||
|
||||
return *what_;
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<string> ErrorInfo::programName = std::nullopt;
|
||||
|
||||
std::ostream& operator<<(std::ostream &os, const hintformat &hf)
|
||||
|
|
|
@ -88,20 +88,8 @@ protected:
|
|||
mutable ErrorInfo err;
|
||||
|
||||
mutable std::optional<string> what_;
|
||||
const string& calcWhat() const
|
||||
{
|
||||
if (what_.has_value())
|
||||
return *what_;
|
||||
else {
|
||||
err.name = sname();
|
||||
const string& calcWhat() const;
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << err;
|
||||
what_ = oss.str();
|
||||
|
||||
return *what_;
|
||||
}
|
||||
}
|
||||
public:
|
||||
unsigned int status = 1; // exit status
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <list>
|
||||
#include <set>
|
||||
#include <map>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
Loading…
Reference in a new issue