Use unique_ptr for d-pointers (#1095)

* clang-tidy: make deleted members public

One oversight of modernize-use-equals-delete is that the C++11 way of
doing this is to make it public, which makes the warning still trigger.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* clang-tidy: add missing deleted functions

Found with cppcoreguidelines-special-member-functions

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* unique_ptr conversions

unique_ptr is a safer and cleaner way to handle d pointers.

Also added missing = default.

Signed-off-by: Rosen Penev <rosenp@gmail.com>

---------

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2023-08-07 13:08:40 -07:00
committed by GitHub
parent 843a8aac80
commit 185bb7042e
183 changed files with 836 additions and 835 deletions

View File

@ -139,6 +139,9 @@ public:
deleteFile(m_filename);
}
ScopedFileCopy(const ScopedFileCopy &) = delete;
ScopedFileCopy &operator=(const ScopedFileCopy &) = delete;
string fileName() const
{
return m_filename;