diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-24T21·29+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-24T21·29+0100 |
commit | 838f86b0fd880b26539664140f04e5d16669dad8 (patch) | |
tree | c8fee2f0c136fbe5bb0735604e2f04d5b02698ba /third_party/nix/src/libutil/serialise.hh | |
parent | f30b2e610d9e612504a9f6460e0cc83413b80aeb (diff) |
style(3p/nix): Remove 'using std::*' from types.hh r/840
It is considered bad form to use things from includes in headers, as these directives propagate to everywhere else and can make it confusing. types.hh (which is includes almost literally everywhere) had some of these directives, which this commit removes.
Diffstat (limited to 'third_party/nix/src/libutil/serialise.hh')
-rw-r--r-- | third_party/nix/src/libutil/serialise.hh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/third_party/nix/src/libutil/serialise.hh b/third_party/nix/src/libutil/serialise.hh index a5992b50ec6e..dc877487ee7e 100644 --- a/third_party/nix/src/libutil/serialise.hh +++ b/third_party/nix/src/libutil/serialise.hh @@ -135,9 +135,9 @@ struct StringSink : Sink { /* A source that reads data from a string. */ struct StringSource : Source { - const string& s; + const std::string& s; size_t pos; - StringSource(const string& _s) : s(_s), pos(0) {} + StringSource(const std::string& _s) : s(_s), pos(0) {} size_t read(unsigned char* data, size_t len) override; }; @@ -231,7 +231,7 @@ inline Sink& operator<<(Sink& sink, uint64_t n) { return sink; } -Sink& operator<<(Sink& sink, const string& s); +Sink& operator<<(Sink& sink, const std::string& s); Sink& operator<<(Sink& sink, const Strings& s); Sink& operator<<(Sink& sink, const StringSet& s); @@ -265,12 +265,12 @@ inline uint64_t readLongLong(Source& source) { void readPadding(size_t len, Source& source); size_t readString(unsigned char* buf, size_t max, Source& source); -string readString(Source& source, - size_t max = std::numeric_limits<size_t>::max()); +std::string readString(Source& source, + size_t max = std::numeric_limits<size_t>::max()); template <class T> T readStrings(Source& source); -Source& operator>>(Source& in, string& s); +Source& operator>>(Source& in, std::string& s); template <typename T> Source& operator>>(Source& in, T& n) { |