mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
clang-tidy: fix bugprone-unhandled-self-assignment lint
This commit is contained in:
@@ -40,11 +40,13 @@ cmSourceGroup::cmSourceGroup(cmSourceGroup const& r)
|
|||||||
|
|
||||||
cmSourceGroup& cmSourceGroup::operator=(cmSourceGroup const& r)
|
cmSourceGroup& cmSourceGroup::operator=(cmSourceGroup const& r)
|
||||||
{
|
{
|
||||||
this->Name = r.Name;
|
if (this != &r) {
|
||||||
this->GroupRegex = r.GroupRegex;
|
this->Name = r.Name;
|
||||||
this->GroupFiles = r.GroupFiles;
|
this->GroupRegex = r.GroupRegex;
|
||||||
this->SourceFiles = r.SourceFiles;
|
this->GroupFiles = r.GroupFiles;
|
||||||
*(this->Internal) = *(r.Internal);
|
this->SourceFiles = r.SourceFiles;
|
||||||
|
*(this->Internal) = *(r.Internal);
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user