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 parseLogFormat(const string &logFormatStr) {
LogFormat parseLogFormat(const std::string & logFormatStr) {
if (logFormatStr == "raw")
return LogFormat::raw;
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);
}
Logger *makeDefaultLogger() {
Logger * makeDefaultLogger() {
switch (defaultLogFormat) {
case LogFormat::raw:
return makeSimpleLogger(false);
@ -34,11 +34,11 @@ Logger *makeDefaultLogger() {
}
}
void setLogFormat(const string &logFormatStr) {
void setLogFormat(const std::string & logFormatStr) {
setLogFormat(parseLogFormat(logFormatStr));
}
void setLogFormat(const LogFormat &logFormat) {
void setLogFormat(const LogFormat & logFormat) {
defaultLogFormat = logFormat;
createDefaultLogger();
}

View file

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

View file

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

View file

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