refactor(tvix/libutil): Mark single-argument constructors explicit
This is the clang-tidy lint 'google-explicit-constructor'. There's a whole bunch of breakage that was introduced by this, and we had to opt out a few types of this (esp. the string formatting crap). In some cases minor other changes have been done to keep the code working, instead of converting between types (e.g. an explicit comparison operator implementation for nix::Pid). Change-Id: I12e1ca51a6bc2c882dba81a2526b9729d26988e7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1832 Tested-by: BuildkiteCI Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
parent
1443298657
commit
1cf11317ca
34 changed files with 309 additions and 272 deletions
|
|
@ -109,8 +109,8 @@ static int _main(int argc, char* argv[]) {
|
|||
mkdir(currentLoad.c_str(), 0777);
|
||||
|
||||
while (true) {
|
||||
bestSlotLock = -1;
|
||||
AutoCloseFD lock = openLockFile(currentLoad + "/main-lock", true);
|
||||
bestSlotLock = AutoCloseFD(-1);
|
||||
AutoCloseFD lock(openLockFile(currentLoad + "/main-lock", true));
|
||||
lockFile(lock.get(), ltWrite, true);
|
||||
|
||||
bool rightType = false;
|
||||
|
|
@ -177,7 +177,7 @@ static int _main(int argc, char* argv[]) {
|
|||
|
||||
futimens(bestSlotLock.get(), nullptr);
|
||||
|
||||
lock = -1;
|
||||
lock = AutoCloseFD(-1);
|
||||
|
||||
try {
|
||||
DLOG(INFO) << "connecting to '" << bestMachine->storeUri << "'";
|
||||
|
|
@ -240,7 +240,7 @@ static int _main(int argc, char* argv[]) {
|
|||
substitute);
|
||||
}
|
||||
|
||||
uploadLock = -1;
|
||||
uploadLock = AutoCloseFD(-1);
|
||||
|
||||
BasicDerivation drv(
|
||||
readDerivation(store->realStoreDir + "/" + baseNameOf(drvPath)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue