Style fixes

This commit is contained in:
Eelco Dolstra 2020-06-11 15:39:08 +02:00
parent 801112de1a
commit 8bd892117a
4 changed files with 8 additions and 8 deletions

View file

@ -5,7 +5,7 @@ namespace nix {
LogFormat defaultLogFormat = LogFormat::raw; LogFormat defaultLogFormat = LogFormat::raw;
LogFormat parseLogFormat(const string &logFormatStr) { LogFormat parseLogFormat(const std::string & logFormatStr) {
if (logFormatStr == "raw") if (logFormatStr == "raw")
return LogFormat::raw; return LogFormat::raw;
else if (logFormatStr == "raw-with-logs") else if (logFormatStr == "raw-with-logs")
@ -19,7 +19,7 @@ LogFormat parseLogFormat(const string &logFormatStr) {
throw Error("option 'log-format' has an invalid value '%s'", logFormatStr); throw Error("option 'log-format' has an invalid value '%s'", logFormatStr);
} }
Logger *makeDefaultLogger() { Logger * makeDefaultLogger() {
switch (defaultLogFormat) { switch (defaultLogFormat) {
case LogFormat::raw: case LogFormat::raw:
return makeSimpleLogger(false); return makeSimpleLogger(false);
@ -34,11 +34,11 @@ Logger *makeDefaultLogger() {
} }
} }
void setLogFormat(const string &logFormatStr) { void setLogFormat(const std::string & logFormatStr) {
setLogFormat(parseLogFormat(logFormatStr)); setLogFormat(parseLogFormat(logFormatStr));
} }
void setLogFormat(const LogFormat &logFormat) { void setLogFormat(const LogFormat & logFormat) {
defaultLogFormat = logFormat; defaultLogFormat = logFormat;
createDefaultLogger(); createDefaultLogger();
} }

View file

@ -12,8 +12,8 @@ enum class LogFormat {
barWithLogs, barWithLogs,
}; };
void setLogFormat(const string &logFormatStr); void setLogFormat(const std::string & logFormatStr);
void setLogFormat(const LogFormat &logFormat); void setLogFormat(const LogFormat & logFormat);
void createDefaultLogger(); void createDefaultLogger();

View file

@ -461,7 +461,7 @@ public:
} }
}; };
Logger *makeProgressBar(bool printBuildLogs) Logger * makeProgressBar(bool printBuildLogs)
{ {
return new ProgressBar( return new ProgressBar(
printBuildLogs, printBuildLogs,

View file

@ -4,7 +4,7 @@
namespace nix { namespace nix {
Logger* makeProgressBar(bool printBuildLogs = false); Logger * makeProgressBar(bool printBuildLogs = false);
void startProgressBar(bool printBuildLogs = false); void startProgressBar(bool printBuildLogs = false);