JDimproved / JDim

2ch browser for linux
https://jdimproved.github.io/JDim/
GNU General Public License v2.0
44 stars 11 forks source link

Fix compiler warning for -Wdeprecated-copy-with-dtor #1287

Closed ma8ma closed 8 months ago

ma8ma commented 8 months ago

ユーザー定義のデストラクタを持つクラスはコピーコンストラクタを暗黙的に生成するのは非推奨とコンパイラーに指摘されたため修正します。

メンバー変数は基本型(fundamental types)のみのでリソース管理を行わないのでコンストラクタ、デストラクタを削除して暗黙の生成に変更します。

clang-17のレポート (file pathを一部省略)

src/article/caret.h:22:9: warning: definition of implicit copy assignment operator for 'CARET_POSITION' is deprecated because it has a user-declared destructor [-Wdeprecated-copy-with-dtor]
   22 |         ~CARET_POSITION() noexcept = default;
      |         ^