From d0745083651c2935d6a80582e1cd4df214f3d88b Mon Sep 17 00:00:00 2001 From: Victoriya Fedotova Date: Wed, 4 Dec 2024 12:30:44 +0100 Subject: [PATCH] Fix coverity hits in boosting algorithms (#3006) Default assignment operator was added in 'prediction::Input' classes in AdaBoost, BrownBoost and LogitBoost algorithms to fix rule of three violations. --- cpp/daal/include/algorithms/boosting/adaboost_predict_types.h | 1 + cpp/daal/include/algorithms/boosting/brownboost_predict_types.h | 1 + cpp/daal/include/algorithms/boosting/logitboost_predict_types.h | 1 + 3 files changed, 3 insertions(+) diff --git a/cpp/daal/include/algorithms/boosting/adaboost_predict_types.h b/cpp/daal/include/algorithms/boosting/adaboost_predict_types.h index 4696ceb70a4..117b53e9e2c 100755 --- a/cpp/daal/include/algorithms/boosting/adaboost_predict_types.h +++ b/cpp/daal/include/algorithms/boosting/adaboost_predict_types.h @@ -55,6 +55,7 @@ class DAAL_EXPORT Input : public classifier::prediction::Input public: Input() {} Input(const Input & other) : classifier::prediction::Input(other) {} + Input & operator=(const Input & other) = default; virtual ~Input() {} using super::get; diff --git a/cpp/daal/include/algorithms/boosting/brownboost_predict_types.h b/cpp/daal/include/algorithms/boosting/brownboost_predict_types.h index 01ed65f0e1d..3c952582c82 100755 --- a/cpp/daal/include/algorithms/boosting/brownboost_predict_types.h +++ b/cpp/daal/include/algorithms/boosting/brownboost_predict_types.h @@ -62,6 +62,7 @@ class DAAL_EXPORT Input : public classifier::prediction::Input public: Input() : classifier::prediction::Input() {} Input(const Input & other) : classifier::prediction::Input(other) {} + Input & operator=(const Input & other) = default; virtual ~Input() {} using super::get; diff --git a/cpp/daal/include/algorithms/boosting/logitboost_predict_types.h b/cpp/daal/include/algorithms/boosting/logitboost_predict_types.h index b80b84496f9..5248686e4b1 100755 --- a/cpp/daal/include/algorithms/boosting/logitboost_predict_types.h +++ b/cpp/daal/include/algorithms/boosting/logitboost_predict_types.h @@ -63,6 +63,7 @@ class DAAL_EXPORT Input : public classifier::prediction::Input public: Input() : classifier::prediction::Input() {} Input(const Input & other) : classifier::prediction::Input(other) {} + Input & operator=(const Input & other) = default; virtual ~Input() {} using super::get;