diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-01-31 17:28:23 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-01-31 17:35:01 +0100 |
commit | 365539c84691d470b44d35df374d8c049f8c1192 (patch) | |
tree | 5f2644692ed3076d35347bc79cef5790681165e6 /src/protocol.cpp | |
parent | 63d4ee1968144cc3d115f92baef95785abf813ac (diff) |
refactor: init vectors via std::{begin,end} to avoid pointer arithmetic
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r-- | src/protocol.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 56e738eaa8..0b893b9272 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -5,7 +5,6 @@ #include <protocol.h> -#include <util/strencodings.h> #include <util/system.h> static std::atomic<bool> g_initial_block_download_completed(false); @@ -86,7 +85,7 @@ const static std::string allNetMessageTypes[] = { NetMsgType::CFCHECKPT, NetMsgType::WTXIDRELAY, }; -const static std::vector<std::string> allNetMessageTypesVec(allNetMessageTypes, allNetMessageTypes+ARRAYLEN(allNetMessageTypes)); +const static std::vector<std::string> allNetMessageTypesVec(std::begin(allNetMessageTypes), std::end(allNetMessageTypes)); CMessageHeader::CMessageHeader() { |