diff options
author | Jon Atack <jon@atack.com> | 2021-05-19 19:26:56 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-05-19 19:41:05 +0200 |
commit | 39393479c514f271c42750ffcd0adc6bc1db2e2f (patch) | |
tree | 9a980e84ec481eadb5eb7738917d2ada83066dfe /src/net_permissions.cpp | |
parent | d4c409cf09d02d3978b590ebdc55ff50f9938d3e (diff) |
p2p: pass strings to NetPermissions::TryParse functions by const ref
Diffstat (limited to 'src/net_permissions.cpp')
-rw-r--r-- | src/net_permissions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/net_permissions.cpp b/src/net_permissions.cpp index 228453df20..d0a45f90fa 100644 --- a/src/net_permissions.cpp +++ b/src/net_permissions.cpp @@ -20,8 +20,8 @@ const std::vector<std::string> NET_PERMISSIONS_DOC{ namespace { -// The parse the following format "perm1,perm2@xxxxxx" -bool TryParsePermissionFlags(const std::string str, NetPermissionFlags& output, size_t& readen, bilingual_str& error) +// Parse the following format: "perm1,perm2@xxxxxx" +bool TryParsePermissionFlags(const std::string& str, NetPermissionFlags& output, size_t& readen, bilingual_str& error) { NetPermissionFlags flags = NetPermissionFlags::None; const auto atSeparator = str.find('@'); @@ -81,7 +81,7 @@ std::vector<std::string> NetPermissions::ToStrings(NetPermissionFlags flags) return strings; } -bool NetWhitebindPermissions::TryParse(const std::string str, NetWhitebindPermissions& output, bilingual_str& error) +bool NetWhitebindPermissions::TryParse(const std::string& str, NetWhitebindPermissions& output, bilingual_str& error) { NetPermissionFlags flags; size_t offset; @@ -104,7 +104,7 @@ bool NetWhitebindPermissions::TryParse(const std::string str, NetWhitebindPermis return true; } -bool NetWhitelistPermissions::TryParse(const std::string str, NetWhitelistPermissions& output, bilingual_str& error) +bool NetWhitelistPermissions::TryParse(const std::string& str, NetWhitelistPermissions& output, bilingual_str& error) { NetPermissionFlags flags; size_t offset; |