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:
@@ -3670,11 +3670,15 @@ struct _TEXT_EDIT_DIALOG_PARAM {
|
|||||||
std::string& Text;
|
std::string& Text;
|
||||||
const WCHAR* Title;
|
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) {
|
_TEXT_EDIT_DIALOG_PARAM& operator=( const _TEXT_EDIT_DIALOG_PARAM& other) {
|
||||||
|
if (this != &other)
|
||||||
|
{
|
||||||
ReadOnly = other.ReadOnly;
|
ReadOnly = other.ReadOnly;
|
||||||
Text = other.Text;
|
Text = other.Text;
|
||||||
Title = other.Title;
|
Title = other.Title;
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -601,6 +601,30 @@ struct HostDevice
|
|||||||
|
|
||||||
~HostDevice () {}
|
~HostDevice () {}
|
||||||
|
|
||||||
|
HostDevice& operator= (const HostDevice& device)
|
||||||
|
{
|
||||||
|
if (this != &device)
|
||||||
|
{
|
||||||
|
Bootable = device.Bootable;
|
||||||
|
ContainsSystem = device.ContainsSystem;
|
||||||
|
DynamicVolume = device.DynamicVolume;
|
||||||
|
Floppy = device.Floppy;
|
||||||
|
IsPartition = device.IsPartition;
|
||||||
|
IsVirtualPartition = device.IsVirtualPartition;
|
||||||
|
HasUnencryptedFilesystem = device.HasUnencryptedFilesystem;
|
||||||
|
MountPoint = device.MountPoint;
|
||||||
|
Name = device.Name;
|
||||||
|
Path = device.Path;
|
||||||
|
Removable = device.Removable;
|
||||||
|
Size = device.Size;
|
||||||
|
SystemNumber = device.SystemNumber;
|
||||||
|
HasVolumeIDs = device.HasVolumeIDs;
|
||||||
|
Partitions = device.Partitions;
|
||||||
|
memcpy (VolumeIDs, device.VolumeIDs, sizeof (VolumeIDs));
|
||||||
|
}
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
bool Bootable;
|
bool Bootable;
|
||||||
bool ContainsSystem;
|
bool ContainsSystem;
|
||||||
bool DynamicVolume;
|
bool DynamicVolume;
|
||||||
|
|||||||
Reference in New Issue
Block a user