refactor: init vectors via std::{begin,end} to avoid pointer arithmetic

This commit is contained in:
Sebastian Falbesoner
2021-01-31 17:28:23 +01:00
parent 63d4ee1968
commit 365539c846
3 changed files with 4 additions and 6 deletions

View File

@@ -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()
{