Fix uninitialized values

- Use C++11 default member initializers

Signed-off-by: Veli-Matti Visuri <veli-matti.visuri@cerescon.fi> (github: visuve)
This commit is contained in:
visuve 2017-09-17 14:53:38 +03:00 committed by John Preston
parent 07106897a6
commit 8c92f42de3
3 changed files with 12 additions and 12 deletions

View File

@ -113,7 +113,7 @@ public:
using Change = MainWindow::ShadowsChange;
using Changes = MainWindow::ShadowsChanges;
_PsShadowWindows() : screenDC(0), max_w(0), max_h(0), _x(0), _y(0), _w(0), _h(0), hidden(true), r(0), g(0), b(0), noKeyColor(RGB(255, 255, 255)) {
_PsShadowWindows() : screenDC(0), noKeyColor(RGB(255, 255, 255)) {
for (int i = 0; i < 4; ++i) {
dcs[i] = 0;
bitmaps[i] = 0;
@ -511,19 +511,19 @@ public:
private:
int _x, _y, _w, _h;
int _metaSize, _fullsize, _size, _shift;
int _x = 0, _y = 0, _w = 0, _h = 0;
int _metaSize = 0, _fullsize = 0, _size = 0, _shift = 0;
QVector<BYTE> _alphas, _colors;
bool hidden;
bool hidden = true;
HWND hwnds[4];
HDC dcs[4], screenDC;
HBITMAP bitmaps[4];
int max_w, max_h;
int max_w = 0, max_h = 0;
BLENDFUNCTION blend;
BYTE r, g, b;
BYTE r = 0, g = 0, b = 0;
COLORREF noKeyColor;
static LRESULT CALLBACK _PsShadowWindows::wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);

View File

@ -189,7 +189,7 @@ struct FileLoadResult {
uint64 id;
FileLoadTo to;
SendMediaType type;
SendMediaType type = SendMediaType::File;
QString filepath;
QByteArray content;

View File

@ -717,7 +717,7 @@ enum { _MaxItemLength = 4096 };
struct BidiControl {
inline BidiControl(bool rtl)
: cCtx(0), base(rtl ? 1 : 0), level(rtl ? 1 : 0), override(false) {}
: base(rtl ? 1 : 0), level(rtl ? 1 : 0) {}
inline void embed(bool rtl, bool o = false) {
unsigned int toAdd = 1;
@ -751,13 +751,13 @@ struct BidiControl {
}
struct {
unsigned int level;
bool override;
unsigned int level = 0;
bool override = false;
} ctx[_MaxBidiLevel];
unsigned int cCtx;
unsigned int cCtx = 0;
const unsigned int base;
unsigned int level;
bool override;
bool override = false;
};
static void eAppendItems(QScriptAnalysis *analysis, int &start, int &stop, const BidiControl &control, QChar::Direction dir) {