VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dlgcode.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:07:44 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-26 01:21:54 +0200
commit9a890ec2fc10e5bef4e2d3b9800186ec1673cde1 (patch)
tree559490a0d0f7e16c052ae10302ab439cda7f6aad /src/Common/Dlgcode.c
parent7d1724e93b17c5095bb01c9f053600b3a85c3cdc (diff)
downloadVeraCrypt-9a890ec2fc10e5bef4e2d3b9800186ec1673cde1.tar.gz
VeraCrypt-9a890ec2fc10e5bef4e2d3b9800186ec1673cde1.zip
Windows: fix warning reported by static code analyzed by adding copy constructor to _TEXT_EDIT_DIALOG_PARAM and = operator to HostDevice
Diffstat (limited to 'src/Common/Dlgcode.c')
-rw-r--r--src/Common/Dlgcode.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 737e02ef..fc1cdc31 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -3670,11 +3670,15 @@ struct _TEXT_EDIT_DIALOG_PARAM {
std::string& Text;
const WCHAR* Title;
- _TEXT_EDIT_DIALOG_PARAM(BOOL _readOnly, const WCHAR* title, std::string& _text) : Title(title), Text(_text), ReadOnly(_readOnly) {}
+ _TEXT_EDIT_DIALOG_PARAM (const _TEXT_EDIT_DIALOG_PARAM& other) : ReadOnly (other.ReadOnly), Text (other.Text), Title (other.Title) {}
+ _TEXT_EDIT_DIALOG_PARAM(BOOL _readOnly, const WCHAR* title, std::string& _text) : ReadOnly(_readOnly), Text(_text), Title(title) {}
_TEXT_EDIT_DIALOG_PARAM& operator=( const _TEXT_EDIT_DIALOG_PARAM& other) {
- ReadOnly = other.ReadOnly;
- Text = other.Text;
- Title = other.Title;
+ if (this != &other)
+ {
+ ReadOnly = other.ReadOnly;
+ Text = other.Text;
+ Title = other.Title;
+ }
return *this;
}
};