mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 16:52:27 +00:00
remove using std::*, switch to include guard
This commit is contained in:
parent
a72b6b2ec8
commit
8713aeac5e
@ -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)
|
||||
|
@ -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
|
||||
|
@ -3,10 +3,6 @@
|
||||
#include <optional>
|
||||
#include <iostream>
|
||||
|
||||
using std::optional;
|
||||
using std::nullopt;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
|
||||
int main()
|
||||
@ -73,9 +69,9 @@ int main()
|
||||
.nixFile("myfile.nix")
|
||||
.lineNumber(40)
|
||||
.columnRange(13,7)
|
||||
.linesOfCode(nullopt
|
||||
.linesOfCode(std::nullopt
|
||||
,"this is the problem line of code"
|
||||
,nullopt)
|
||||
,std::nullopt)
|
||||
.hint(hintfmt("this hint has %1% templated %2%!!") % "yellow" % "values")
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user