From: Jos Collin Date: Thu, 12 Apr 2018 08:12:39 +0000 (+0530) Subject: client: Take reference for operator= function parameter X-Git-Tag: v13.1.0~247^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6934ee432006e5929bbe494a5ab9713fc36ce151;p=ceph.git client: Take reference for operator= function parameter Why copy? Take a reference for the operator=() function parameter. Signed-off-by: Jos Collin --- diff --git a/src/client/UserPerm.h b/src/client/UserPerm.h index d8a41957eb0d..89ea954a658a 100644 --- a/src/client/UserPerm.h +++ b/src/client/UserPerm.h @@ -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; }