permission: address coverity warning

The latest version of coverity has suggestions on how
to improve formance. Address one of these suggestions.

Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50215
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
Michael Dawson authored and Michaël Zasso committed 2023-11-11 20:38:26 +01:00
1 parent 43074ee21c
commit 7c35055c8e
1 file changed
+1 -1
+1 -1
View File
@@ -31,7 +31,7 @@ class FSPermission final : public PermissionBase {
Node() : wildcard_child(nullptr), is_leaf(false) {}
Node* CreateChild(std::string prefix) {
Node* CreateChild(const std::string& prefix) {
if (prefix.empty() && !is_leaf) {
is_leaf = true;
return this;