Skip to content

Commit

Permalink
library.cpp: fixed bugprone-unhandled-self-assignment clang-tidy wa…
Browse files Browse the repository at this point in the history
…rning
  • Loading branch information
firewave committed Jan 30, 2025
1 parent 8f589bd commit 854107e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ Library::Library(const Library& other)

Library& Library::operator=(const Library& other) &
{
if (this == &other)
return *this;

mData.reset(new LibraryData(*other.mData));
return *this;
}
Expand Down

0 comments on commit 854107e

Please sign in to comment.