Replace the Error() object with an error() function which takes fmt

formatspecs, making for much cleaner code. Reformatted everything.

This actually happened in multiple steps but then I corrupted my local
repository and I had to recover from the working tree.
This commit is contained in:
dg
2023-05-09 20:59:44 +00:00
parent bfa0846ad0
commit 466c3c34e5
168 changed files with 5722 additions and 5135 deletions

View File

@@ -5,7 +5,6 @@
#include "image.h"
#include "logger.h"
#include "lib/config.pb.h"
#include "fmt/format.h"
#include <algorithm>
#include <iostream>
#include <fstream>
@@ -20,7 +19,7 @@ public:
std::ifstream inputFile(
_config.filename(), std::ios::in | std::ios::binary);
if (!inputFile.is_open())
Error() << "cannot open input file";
error("cannot open input file");
Bytes data;
data.writer() += inputFile;
@@ -61,8 +60,7 @@ public:
break;
default:
Error() << fmt::format(
"don't understand DiskCopy disks of type {}", encoding);
error("don't understand DiskCopy disks of type {}", encoding);
}
Logger() << fmt::format(