mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
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:
1 parent
43074ee21c
commit
7c35055c8e
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user