From 00e6b77c29eb0b889b59917c988327f513956c0d Mon Sep 17 00:00:00 2001 From: Artem Grinev Date: Sat, 28 Aug 2021 22:53:19 +0400 Subject: [PATCH] Initialize all fields in Partition --- src/core/partition.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/partition.h b/src/core/partition.h index e25678b..e4bbff7 100644 --- a/src/core/partition.h +++ b/src/core/partition.h @@ -264,25 +264,25 @@ private: m_Number = n; } - qint32 m_Number; + qint32 m_Number = 0; Partitions m_Children; - QPointer< PartitionNode > m_Parent; - FileSystem* m_FileSystem; + QPointer< PartitionNode > m_Parent = nullptr; + FileSystem* m_FileSystem = nullptr; PartitionRole m_Roles; - qint64 m_FirstSector; - qint64 m_LastSector; + qint64 m_FirstSector = 0; + qint64 m_LastSector = 0; QString m_DevicePath; QString m_Label; QString m_Type; QString m_UUID; - quint64 m_Attributes; + quint64 m_Attributes = 0; QString m_PartitionPath; QString m_MountPoint; PartitionTable::Flags m_AvailableFlags; PartitionTable::Flags m_ActiveFlags; - bool m_IsMounted; - qint64 m_SectorSize; - State m_State; + bool m_IsMounted = false; + qint64 m_SectorSize = 0; + State m_State = None; }; QTextStream& operator<<(QTextStream& stream, const Partition& p);