diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/error.cc | 6 | ||||
-rw-r--r-- | src/libutil/error.hh | 14 |
2 files changed, 5 insertions, 15 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc index 5384248f8..2b7a079dc 100644 --- a/src/libutil/error.cc +++ b/src/libutil/error.cc @@ -5,11 +5,7 @@ namespace nix { -using std::cout; -using std::endl; -using std::nullopt; - -optional<string> ErrorInfo::programName = nullopt; +optional<string> ErrorInfo::programName = std::nullopt; // return basic_format? string showErrLine(ErrLine &errLine) diff --git a/src/libutil/error.hh b/src/libutil/error.hh index 00539f06a..614f08a35 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -1,4 +1,5 @@ -#pragma once +#ifndef error_hh +#define error_hh #include "ansicolor.hh" #include <string> @@ -8,12 +9,6 @@ #include <boost/format.hpp> -using std::string; -using std::optional; -using boost::format; -using std::cout; -using std::endl; - namespace nix { typedef enum @@ -36,7 +31,6 @@ class ErrLine { optional<string> prevLineOfCode; string errLineOfCode; optional<string> nextLineOfCode; - }; class NixCode { @@ -112,8 +106,6 @@ class ErrorInfo { protected: // constructor is protected, so only the builder classes can create an ErrorInfo. ErrorInfo(ErrLevel level) { this->level = level; } - - }; // Init as error @@ -285,7 +277,9 @@ typedef AddName< // -------------------------------------------------------- // error printing +// just to cout for now. void printErrorInfo(ErrorInfo &einfo); } +#endif |