forked from lix-project/lix
add has_value check; remove obslete friend class
This commit is contained in:
parent
833501f6f1
commit
d9632765a8
|
@ -162,7 +162,7 @@ std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
|
|||
out << prefix << std::endl;
|
||||
|
||||
// lines of code.
|
||||
if (einfo.nixCode->errLineOfCode != "") {
|
||||
if (einfo.nixCode.has_value() && einfo.nixCode->errLineOfCode != "") {
|
||||
printCodeLines(prefix, *einfo.nixCode);
|
||||
out << prefix << std::endl;
|
||||
}
|
||||
|
|
|
@ -92,9 +92,11 @@ public:
|
|||
{
|
||||
fmt.exceptions(boost::io::all_error_bits ^ boost::io::too_many_args_bit);
|
||||
}
|
||||
|
||||
hintformat(const hintformat &hf)
|
||||
: fmt(hf.fmt)
|
||||
{}
|
||||
|
||||
template<class T>
|
||||
hintformat& operator%(const T &value)
|
||||
{
|
||||
|
@ -102,14 +104,11 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
std::string str() const
|
||||
{
|
||||
return fmt.str();
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
friend class AddHint;
|
||||
private:
|
||||
format fmt;
|
||||
};
|
||||
|
|
|
@ -62,11 +62,12 @@ public:
|
|||
|
||||
virtual void logEI(const ErrorInfo &ei) = 0;
|
||||
|
||||
void logEI(Verbosity lvl, ErrorInfo ei) {
|
||||
ei.level = lvl;
|
||||
logEI(ei);
|
||||
void logEI(Verbosity lvl, ErrorInfo ei)
|
||||
{
|
||||
ei.level = lvl;
|
||||
logEI(ei);
|
||||
}
|
||||
|
||||
|
||||
virtual void warn(const std::string & msg);
|
||||
|
||||
virtual void startActivity(ActivityId act, Verbosity lvl, ActivityType type,
|
||||
|
|
Loading…
Reference in a new issue