mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-10 23:43:58 +03:00
clang-tidy: fix bugprone-unhandled-self-assignment lint
This commit is contained in:
1 parent
16455374cf
commit
3d0ac2dafa
1 file changed
+7
-5
@@ -40,11 +40,13 @@ cmSourceGroup::cmSourceGroup(cmSourceGroup const& r)
|
||||
|
||||
cmSourceGroup& cmSourceGroup::operator=(cmSourceGroup const& r)
|
||||
{
|
||||
this->Name = r.Name;
|
||||
this->GroupRegex = r.GroupRegex;
|
||||
this->GroupFiles = r.GroupFiles;
|
||||
this->SourceFiles = r.SourceFiles;
|
||||
*(this->Internal) = *(r.Internal);
|
||||
if (this != &r) {
|
||||
this->Name = r.Name;
|
||||
this->GroupRegex = r.GroupRegex;
|
||||
this->GroupFiles = r.GroupFiles;
|
||||
this->SourceFiles = r.SourceFiles;
|
||||
*(this->Internal) = *(r.Internal);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user