1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: fix warning reported by static code analyzed by adding copy constructor to _TEXT_EDIT_DIALOG_PARAM and = operator to HostDevice

This commit is contained in:
Mounir IDRASSI
2020-06-26 01:07:44 +02:00
parent 7d1724e93b
commit 9a890ec2fc
2 changed files with 32 additions and 4 deletions

View File

@@ -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;
}
};