1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

Remove C-style casts

This commit is contained in:
Jacek Galowicz 2023-11-02 15:52:38 +01:00
parent d11d7849f7
commit 9d9f42cc38
3 changed files with 17 additions and 7 deletions

View file

@ -114,7 +114,7 @@ void drainFD(int fd, Sink & sink, bool block)
throw SysError("reading from file");
}
else if (rd == 0) break;
else sink({(char *) buf.data(), (size_t) rd});
else sink({reinterpret_cast<char *>(buf.data()), size_t(rd)});
}
}