]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: Take reference for operator= function parameter 21370/head
authorJos Collin <jcollin@redhat.com>
Thu, 12 Apr 2018 08:12:39 +0000 (13:42 +0530)
committerJos Collin <jcollin@redhat.com>
Thu, 12 Apr 2018 08:21:26 +0000 (13:51 +0530)
Why copy? Take a reference for the operator=() function parameter.

Signed-off-by: Jos Collin <jcollin@redhat.com>
src/client/UserPerm.h

index d8a41957eb0dc807dc5513df01337b079574693c..89ea954a658aa53e2c641cb3cccc254242259591 100644 (file)
@@ -61,7 +61,7 @@ public:
     if (alloced_gids)
       delete[] gids;
   }
-  UserPerm& operator=(const UserPerm o) {
+  UserPerm& operator=(const UserPerm& o) {
     deep_copy_from(o);
     return *this;
   }