From dadc9780a49c467ab469abe1c9384e2ac653babf Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Dec 2015 19:59:39 +0100 Subject: Fix missing initialisations. --- plugingui/lineedit.h | 6 +++--- plugingui/resource.h | 8 ++++---- plugingui/scrollbar.h | 14 ++++++++------ 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'plugingui') diff --git a/plugingui/lineedit.h b/plugingui/lineedit.h index 515ea94..ae1c7b8 100644 --- a/plugingui/lineedit.h +++ b/plugingui/lineedit.h @@ -63,16 +63,16 @@ private: Font font; std::string _text; - size_t pos = 0; + size_t pos{0}; std::string visibleText; - size_t offsetPos = 0; + size_t offsetPos{0}; enum state_t { Noop, WalkLeft, WalkRight, }; - state_t walkstate; + state_t walkstate{Noop}; bool readonly; }; diff --git a/plugingui/resource.h b/plugingui/resource.h index 101c689..2246271 100644 --- a/plugingui/resource.h +++ b/plugingui/resource.h @@ -41,10 +41,10 @@ public: protected: std::string externalData; - bool isValid = false; - bool isInternal = false; - const char *internalData = nullptr; - size_t internalSize = 0; + bool isValid{false}; + bool isInternal{false}; + const char *internalData{nullptr}; + size_t internalSize{0}; }; } // GUI:: diff --git a/plugingui/scrollbar.h b/plugingui/scrollbar.h index 42e504e..99f8377 100644 --- a/plugingui/scrollbar.h +++ b/plugingui/scrollbar.h @@ -26,6 +26,8 @@ */ #pragma once +#include + #include "widget.h" #include "image.h" #include "notifier.h" @@ -58,13 +60,13 @@ protected: void mouseMoveEvent(MouseMoveEvent* mouseMoveEvent) override; private: - int maxValue; - int currentValue; - int rangeValue; + int maxValue{100}; + int currentValue{0}; + int rangeValue{10}; - int yOffset; - int valueOffset; - bool dragging; + int yOffset{0}; + int valueOffset{0}; + bool dragging{false}; Image bg_img; }; -- cgit v1.2.3