From 91f6e6e6d1720e1154ad3f70a5098e9028efa84a Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Mon, 22 Mar 2021 19:19:05 +0100 Subject: scripted-diff: add NetPermissionFlags scopes where not already present -BEGIN VERIFY SCRIPT- s() { git grep -l "$1" -- 'src' ':!src/net_permissions.h' | xargs sed -i -E "s/([^:])$1/\1NetPermissionFlags::$1/"; } s 'PF_NONE' s 'PF_BLOOMFILTER' s 'PF_RELAY' s 'PF_FORCERELAY' s 'PF_DOWNLOAD' s 'PF_NOBAN' s 'PF_MEMPOOL' s 'PF_ADDR' s 'PF_ISIMPLICIT' s 'PF_ALL' -END VERIFY SCRIPT- Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> --- src/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 6b9a7ef136..32569cc39b 100644 --- a/src/net.h +++ b/src/net.h @@ -402,7 +402,7 @@ public: std::unique_ptr m_deserializer; std::unique_ptr m_serializer; - NetPermissionFlags m_permissionFlags{PF_NONE}; + NetPermissionFlags m_permissionFlags{NetPermissionFlags::PF_NONE}; std::atomic nServices{NODE_NONE}; SOCKET hSocket GUARDED_BY(cs_hSocket); /** Total size of all vSendMsg entries */ -- cgit v1.2.3 From a95540cf435029f06e56749802d71315ca76b0dd Mon Sep 17 00:00:00 2001 From: Jon Atack Date: Sun, 21 Mar 2021 22:46:50 +0100 Subject: scripted-diff: rename NetPermissionFlags enumerators - drop redundant PF_ permission flags prefixes - drop ALL_CAPS naming per https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps - rename IsImplicit to Implicit -BEGIN VERIFY SCRIPT- s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; } s 'PF_NONE' 'None' s 'PF_BLOOMFILTER' 'BloomFilter' s 'PF_RELAY' 'Relay' s 'PF_FORCERELAY' 'ForceRelay' s 'PF_DOWNLOAD' 'Download' s 'PF_NOBAN' 'NoBan' s 'PF_MEMPOOL' 'Mempool' s 'PF_ADDR' 'Addr' s 'PF_ISIMPLICIT' 'Implicit' s 'PF_ALL' 'All' -END VERIFY SCRIPT- --- src/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net.h') diff --git a/src/net.h b/src/net.h index 32569cc39b..65b262e573 100644 --- a/src/net.h +++ b/src/net.h @@ -402,7 +402,7 @@ public: std::unique_ptr m_deserializer; std::unique_ptr m_serializer; - NetPermissionFlags m_permissionFlags{NetPermissionFlags::PF_NONE}; + NetPermissionFlags m_permissionFlags{NetPermissionFlags::None}; std::atomic nServices{NODE_NONE}; SOCKET hSocket GUARDED_BY(cs_hSocket); /** Total size of all vSendMsg entries */ -- cgit v1.2.3