Use C++ 14 alignas(), init some struct fields just because of good practice.

This commit is contained in:
Markus F.X.J. Oberhumer
2021-01-04 21:02:07 +01:00
parent 2575eef3c0
commit 9aef7b0d6f
5 changed files with 42 additions and 47 deletions
+5 -5
View File
@@ -289,8 +289,8 @@ protected:
void set_te64(void *p, upx_uint64_t v) const { bele->set64(p, v); }
protected:
const N_BELE_RTP::AbstractPolicy *bele; // target endianness
InputFile *fi;
const N_BELE_RTP::AbstractPolicy *bele = nullptr; // target endianness
InputFile *fi = nullptr;
off_t file_size; // will get set by constructor
PackHeader ph; // must be filled by canUnpack()
int ph_format;
@@ -301,14 +301,14 @@ protected:
MemBuffer obuf; // output
// UI handler
UiPacker *uip;
UiPacker *uip = nullptr;
// linker
Linker *linker;
Linker *linker = nullptr;
private:
// private to checkPatch()
void *last_patch;
void *last_patch = nullptr;
int last_patch_len;
int last_patch_off;