null as default value for all vars in headers

This commit is contained in:
Ivan Morozov
2022-10-04 18:24:23 +03:00
parent 5750ef2687
commit bb1dc3c8b4
4 changed files with 7 additions and 7 deletions

View File

@ -47,7 +47,7 @@ public:
protected: protected:
std::weak_ptr<IDirectoryEntry> dirEntry; std::weak_ptr<IDirectoryEntry> dirEntry;
CompoundFile* compoundFile; CompoundFile* compoundFile = nullptr;
protected: protected:
CFItem() {}; CFItem() {};

View File

@ -84,7 +84,7 @@ public:
int leftSibling = NOSTREAM; int leftSibling = NOSTREAM;
int rightSibling = NOSTREAM; int rightSibling = NOSTREAM;
int child = NOSTREAM; int child = NOSTREAM;
int stateBits; int stateBits = 0;
static std::shared_ptr<IDirectoryEntry> New(std::wstring name, StgType stgType, SVector<IDirectoryEntry>& dirRepository); static std::shared_ptr<IDirectoryEntry> New(std::wstring name, StgType stgType, SVector<IDirectoryEntry>& dirRepository);
static std::shared_ptr<IDirectoryEntry> TryNew(std::wstring name, StgType stgType, SVector<IDirectoryEntry> &dirRepository); static std::shared_ptr<IDirectoryEntry> TryNew(std::wstring name, StgType stgType, SVector<IDirectoryEntry> &dirRepository);
static std::shared_ptr<IDirectoryEntry> Mock(std::wstring name, StgType stgType); static std::shared_ptr<IDirectoryEntry> Mock(std::wstring name, StgType stgType);
@ -94,8 +94,8 @@ private:
private: private:
int sid = -1; int sid = -1;
char entryName[64]; char entryName[64] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
ushort nameLength; ushort nameLength = 0;
StgType stgType = StgType::StgInvalid; StgType stgType = StgType::StgInvalid;
StgColor stgColor = StgColor::Red; StgColor stgColor = StgColor::Red;
SVector<IDirectoryEntry> emptyDir; SVector<IDirectoryEntry> emptyDir;

View File

@ -25,11 +25,11 @@ public:
USHORT byteOrder = 0xFFFE; USHORT byteOrder = 0xFFFE;
USHORT sectorShift = 9; USHORT sectorShift = 9;
USHORT miniSectorShift = 6; USHORT miniSectorShift = 6;
BYTE unUsed[6]; BYTE unUsed[6] = {0,0,0,0,0,0};
INT directorySectorsNumber = 0; INT directorySectorsNumber = 0;
INT fatSectorsNumber = 0; INT fatSectorsNumber = 0;
INT firstDirectorySectorID = Sector::ENDOFCHAIN; INT firstDirectorySectorID = Sector::ENDOFCHAIN;
uint unUsed2; uint unUsed2 = 0;
uint minSizeStandardStream = 4096; uint minSizeStandardStream = 4096;
INT firstMiniFATSectorID = 0xFFFFFFFE; INT firstMiniFATSectorID = 0xFFFFFFFE;
uint miniFATSectorsNumber = 0; uint miniFATSectorsNumber = 0;

View File

@ -37,7 +37,7 @@ private:
void adjustLength(std::streamsize value, SList<Sector> &availableSectors); void adjustLength(std::streamsize value, SList<Sector> &availableSectors);
private: private:
int sectorSize; int sectorSize = 0;
std::streamsize length = 0; std::streamsize length = 0;
SVector<Sector> sectorChain; SVector<Sector> sectorChain;