diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-07-29 17:47:15 +0200 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2022-03-02 15:40:36 +0100 |
commit | f98cdcb3574ee661223e1a09e1762b2cc85fab2f (patch) | |
tree | ed5b0f92fa13eff713e05898a553646d5b474589 /src | |
parent | 3cb9d9c861710c0cff018bee90b1969193d3ed68 (diff) |
net: pass Span by value to CaptureMessage()
Span is lightweight and need not be passed by const reference.
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 4 | ||||
-rw-r--r-- | src/net.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/net.cpp b/src/net.cpp index b31b618eea..d35120794b 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -3087,7 +3087,7 @@ uint64_t CConnman::CalculateKeyedNetGroup(const CAddress& ad) const void CaptureMessageToFile(const CAddress& addr, const std::string& msg_type, - const Span<const unsigned char>& data, + Span<const unsigned char> data, bool is_incoming) { // Note: This function captures the message at the time of processing, @@ -3118,6 +3118,6 @@ void CaptureMessageToFile(const CAddress& addr, std::function<void(const CAddress& addr, const std::string& msg_type, - const Span<const unsigned char>& data, + Span<const unsigned char> data, bool is_incoming)> CaptureMessage = CaptureMessageToFile; @@ -1275,13 +1275,13 @@ private: /** Dump binary message to file, with timestamp */ void CaptureMessageToFile(const CAddress& addr, const std::string& msg_type, - const Span<const unsigned char>& data, + Span<const unsigned char> data, bool is_incoming); /** Defaults to `CaptureMessageToFile()`, but can be overridden by unit tests. */ extern std::function<void(const CAddress& addr, const std::string& msg_type, - const Span<const unsigned char>& data, + Span<const unsigned char> data, bool is_incoming)> CaptureMessage; |