diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2016-02-27 19:38:15 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2016-02-27 19:38:15 -0800 |
commit | 10f3ea0008a4563c2baa4f29954c285d2d53d7dc (patch) | |
tree | 8aedadea55a31de188be16a1ec140cdbc76adba5 /src/io.h | |
parent | 88a785e32117081b91b813ac6b5437deb33ef0f7 (diff) |
Mark a bunch of constructors as explicit
This prevents undesired implicit conversions
Diffstat (limited to 'src/io.h')
-rw-r--r-- | src/io.h | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -56,7 +56,7 @@ public: class io_close_t : public io_data_t { public: - io_close_t(int f) : + explicit io_close_t(int f) : io_data_t(IO_CLOSE, f) { } @@ -137,7 +137,7 @@ private: /** buffer to save output in */ std::vector<char> out_buffer; - io_buffer_t(int f): + explicit io_buffer_t(int f): io_pipe_t(IO_BUFFER, f, false /* not input */), out_buffer() { @@ -195,7 +195,7 @@ class io_chain_t : public std::vector<shared_ptr<io_data_t> > { public: io_chain_t(); - io_chain_t(const shared_ptr<io_data_t> &); + explicit io_chain_t(const shared_ptr<io_data_t> &); void remove(const shared_ptr<const io_data_t> &element); void push_back(const shared_ptr<io_data_t> &element); |