refactor(3p/nix): Make all single-argument constructors explicit
Implicit constructors can be confusing, especially in a codebase that is already as unintentionally obfuscated as this one. https://google.github.io/styleguide/cppguide.html#Explicit_Constructors
This commit is contained in:
parent
3908732181
commit
88f337588c
12 changed files with 31 additions and 31 deletions
6
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
6
third_party/nix/src/nix-daemon/nix-daemon.cc
vendored
|
|
@ -74,7 +74,7 @@ struct TunnelLogger {
|
|||
|
||||
unsigned int clientVersion;
|
||||
|
||||
TunnelLogger(unsigned int clientVersion) : clientVersion(clientVersion) {}
|
||||
explicit TunnelLogger(unsigned int clientVersion) : clientVersion(clientVersion) {}
|
||||
|
||||
void enqueueMsg(const std::string& s) {
|
||||
auto state(state_.lock());
|
||||
|
|
@ -150,7 +150,7 @@ struct TunnelLogger {
|
|||
|
||||
struct TunnelSink : Sink {
|
||||
Sink& to;
|
||||
TunnelSink(Sink& to) : to(to) {}
|
||||
explicit TunnelSink(Sink& to) : to(to) {}
|
||||
virtual void operator()(const unsigned char* data, size_t len) {
|
||||
to << STDERR_WRITE;
|
||||
writeString(data, len, to);
|
||||
|
|
@ -159,7 +159,7 @@ struct TunnelSink : Sink {
|
|||
|
||||
struct TunnelSource : BufferedSource {
|
||||
Source& from;
|
||||
TunnelSource(Source& from) : from(from) {}
|
||||
explicit TunnelSource(Source& from) : from(from) {}
|
||||
|
||||
protected:
|
||||
size_t readUnbuffered(unsigned char* data, size_t len) override {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue