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:
std::weak_ptr<IDirectoryEntry> dirEntry;
CompoundFile* compoundFile;
CompoundFile* compoundFile = nullptr;
protected:
CFItem() {};

View File

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

View File

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

View File

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