Skip to content

Commit f321deb

Browse files
jszadayevan-charmworks
authored andcommitted
Fix LGTM alert for array element proxy assignment operator (#3453)
1 parent a35fef1 commit f321deb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ck-core/ckarray.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ class CProxyElement_ArrayBase : public CProxy_ArrayBase
177177

178178
CProxyElement_ArrayBase& operator=(const CProxyElement_ArrayBase& other)
179179
{
180-
return *this = CProxyElement_ArrayBase(other);
180+
new (this) CProxyElement_ArrayBase(other);
181+
return *this;
181182
}
182183

183184
bool operator==(const CProxyElement_ArrayBase& other)

0 commit comments

Comments
 (0)