mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Merge pull request #3219 from Ericson2314/semicolons
Fix extra semicolons warnings
This commit is contained in:
commit
5ee23c35b9
10 changed files with 37 additions and 37 deletions
|
@ -432,7 +432,7 @@ Path EvalState::toRealPath(const Path & path, const PathSet & context)
|
||||||
!context.empty() && store->isInStore(path)
|
!context.empty() && store->isInStore(path)
|
||||||
? store->toRealPath(path)
|
? store->toRealPath(path)
|
||||||
: path;
|
: path;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
Value * EvalState::addConstant(const string & name, Value & v)
|
Value * EvalState::addConstant(const string & name, Value & v)
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
MakeError(JSONParseError, EvalError)
|
MakeError(JSONParseError, EvalError);
|
||||||
|
|
||||||
void parseJSON(EvalState & state, const string & s, Value & v);
|
void parseJSON(EvalState & state, const string & s, Value & v);
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
||||||
MakeError(EvalError, Error)
|
MakeError(EvalError, Error);
|
||||||
MakeError(ParseError, Error)
|
MakeError(ParseError, Error);
|
||||||
MakeError(AssertionError, EvalError)
|
MakeError(AssertionError, EvalError);
|
||||||
MakeError(ThrownError, AssertionError)
|
MakeError(ThrownError, AssertionError);
|
||||||
MakeError(Abort, EvalError)
|
MakeError(Abort, EvalError);
|
||||||
MakeError(TypeError, EvalError)
|
MakeError(TypeError, EvalError);
|
||||||
MakeError(UndefinedVarError, Error)
|
MakeError(UndefinedVarError, Error);
|
||||||
MakeError(RestrictedPathError, Error)
|
MakeError(RestrictedPathError, Error);
|
||||||
|
|
||||||
|
|
||||||
/* Position objects. */
|
/* Position objects. */
|
||||||
|
|
|
@ -1515,7 +1515,7 @@ void replaceValidPath(const Path & storePath, const Path tmpPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MakeError(NotDeterministic, BuildError)
|
MakeError(NotDeterministic, BuildError);
|
||||||
|
|
||||||
|
|
||||||
void DerivationGoal::buildDone()
|
void DerivationGoal::buildDone()
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
||||||
MakeError(SubstError, Error)
|
MakeError(SubstError, Error);
|
||||||
MakeError(BuildError, Error) /* denotes a permanent build failure */
|
MakeError(BuildError, Error); // denotes a permanent build failure
|
||||||
MakeError(InvalidPath, Error)
|
MakeError(InvalidPath, Error);
|
||||||
MakeError(Unsupported, Error)
|
MakeError(Unsupported, Error);
|
||||||
MakeError(SubstituteGone, Error)
|
MakeError(SubstituteGone, Error);
|
||||||
MakeError(SubstituterDisabled, Error)
|
MakeError(SubstituterDisabled, Error);
|
||||||
|
|
||||||
|
|
||||||
struct BasicDerivation;
|
struct BasicDerivation;
|
||||||
|
|
|
@ -70,23 +70,23 @@ public:
|
||||||
Args & args;
|
Args & args;
|
||||||
Flag::ptr flag;
|
Flag::ptr flag;
|
||||||
friend class Args;
|
friend class Args;
|
||||||
FlagMaker(Args & args) : args(args), flag(std::make_shared<Flag>()) { };
|
FlagMaker(Args & args) : args(args), flag(std::make_shared<Flag>()) { }
|
||||||
public:
|
public:
|
||||||
~FlagMaker();
|
~FlagMaker();
|
||||||
FlagMaker & longName(const std::string & s) { flag->longName = s; return *this; };
|
FlagMaker & longName(const std::string & s) { flag->longName = s; return *this; }
|
||||||
FlagMaker & shortName(char s) { flag->shortName = s; return *this; };
|
FlagMaker & shortName(char s) { flag->shortName = s; return *this; }
|
||||||
FlagMaker & description(const std::string & s) { flag->description = s; return *this; };
|
FlagMaker & description(const std::string & s) { flag->description = s; return *this; }
|
||||||
FlagMaker & label(const std::string & l) { flag->arity = 1; flag->labels = {l}; return *this; };
|
FlagMaker & label(const std::string & l) { flag->arity = 1; flag->labels = {l}; return *this; }
|
||||||
FlagMaker & labels(const Strings & ls) { flag->arity = ls.size(); flag->labels = ls; return *this; };
|
FlagMaker & labels(const Strings & ls) { flag->arity = ls.size(); flag->labels = ls; return *this; }
|
||||||
FlagMaker & arity(size_t arity) { flag->arity = arity; return *this; };
|
FlagMaker & arity(size_t arity) { flag->arity = arity; return *this; }
|
||||||
FlagMaker & handler(std::function<void(std::vector<std::string>)> handler) { flag->handler = handler; return *this; };
|
FlagMaker & handler(std::function<void(std::vector<std::string>)> handler) { flag->handler = handler; return *this; }
|
||||||
FlagMaker & handler(std::function<void()> handler) { flag->handler = [handler](std::vector<std::string>) { handler(); }; return *this; };
|
FlagMaker & handler(std::function<void()> handler) { flag->handler = [handler](std::vector<std::string>) { handler(); }; return *this; }
|
||||||
FlagMaker & handler(std::function<void(std::string)> handler) {
|
FlagMaker & handler(std::function<void(std::string)> handler) {
|
||||||
flag->arity = 1;
|
flag->arity = 1;
|
||||||
flag->handler = [handler](std::vector<std::string> ss) { handler(std::move(ss[0])); };
|
flag->handler = [handler](std::vector<std::string> ss) { handler(std::move(ss[0])); };
|
||||||
return *this;
|
return *this;
|
||||||
};
|
}
|
||||||
FlagMaker & category(const std::string & s) { flag->category = s; return *this; };
|
FlagMaker & category(const std::string & s) { flag->category = s; return *this; }
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
FlagMaker & dest(T * dest)
|
FlagMaker & dest(T * dest)
|
||||||
|
@ -94,7 +94,7 @@ public:
|
||||||
flag->arity = 1;
|
flag->arity = 1;
|
||||||
flag->handler = [=](std::vector<std::string> ss) { *dest = ss[0]; };
|
flag->handler = [=](std::vector<std::string> ss) { *dest = ss[0]; };
|
||||||
return *this;
|
return *this;
|
||||||
};
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
FlagMaker & set(T * dest, const T & val)
|
FlagMaker & set(T * dest, const T & val)
|
||||||
|
@ -102,7 +102,7 @@ public:
|
||||||
flag->arity = 0;
|
flag->arity = 0;
|
||||||
flag->handler = [=](std::vector<std::string> ss) { *dest = val; };
|
flag->handler = [=](std::vector<std::string> ss) { *dest = val; };
|
||||||
return *this;
|
return *this;
|
||||||
};
|
}
|
||||||
|
|
||||||
FlagMaker & mkHashTypeFlag(HashType * ht);
|
FlagMaker & mkHashTypeFlag(HashType * ht);
|
||||||
};
|
};
|
||||||
|
|
|
@ -274,7 +274,7 @@ Sink & operator << (Sink & sink, const Strings & s);
|
||||||
Sink & operator << (Sink & sink, const StringSet & s);
|
Sink & operator << (Sink & sink, const StringSet & s);
|
||||||
|
|
||||||
|
|
||||||
MakeError(SerialisationError, Error)
|
MakeError(SerialisationError, Error);
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
MakeError(ThreadPoolShutDown, Error)
|
MakeError(ThreadPoolShutDown, Error);
|
||||||
|
|
||||||
/* A simple thread pool that executes a queue of work items
|
/* A simple thread pool that executes a queue of work items
|
||||||
(lambdas). */
|
(lambdas). */
|
||||||
|
|
|
@ -116,9 +116,9 @@ public:
|
||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
using superClass::superClass; \
|
using superClass::superClass; \
|
||||||
};
|
}
|
||||||
|
|
||||||
MakeError(Error, BaseError)
|
MakeError(Error, BaseError);
|
||||||
|
|
||||||
class SysError : public Error
|
class SysError : public Error
|
||||||
{
|
{
|
||||||
|
|
|
@ -160,7 +160,7 @@ void readFull(int fd, unsigned char * buf, size_t count);
|
||||||
void writeFull(int fd, const unsigned char * buf, size_t count, bool allowInterrupts = true);
|
void writeFull(int fd, const unsigned char * buf, size_t count, bool allowInterrupts = true);
|
||||||
void writeFull(int fd, const string & s, bool allowInterrupts = true);
|
void writeFull(int fd, const string & s, bool allowInterrupts = true);
|
||||||
|
|
||||||
MakeError(EndOfFile, Error)
|
MakeError(EndOfFile, Error);
|
||||||
|
|
||||||
|
|
||||||
/* Read a file descriptor until EOF occurs. */
|
/* Read a file descriptor until EOF occurs. */
|
||||||
|
@ -333,10 +333,10 @@ void inline checkInterrupt()
|
||||||
_interrupted();
|
_interrupted();
|
||||||
}
|
}
|
||||||
|
|
||||||
MakeError(Interrupted, BaseError)
|
MakeError(Interrupted, BaseError);
|
||||||
|
|
||||||
|
|
||||||
MakeError(FormatError, Error)
|
MakeError(FormatError, Error);
|
||||||
|
|
||||||
|
|
||||||
/* String tokenizer. */
|
/* String tokenizer. */
|
||||||
|
|
Loading…
Reference in a new issue