summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-12-19 19:59:39 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2015-12-19 19:59:39 +0100
commitdadc9780a49c467ab469abe1c9384e2ac653babf (patch)
tree25f1034e2e7cdef0c36e4138fef5e4ddfe74703e
parent52aa0fb9a1745bd7919c42a37ba48f6bf77e2984 (diff)
Fix missing initialisations.
-rw-r--r--plugingui/lineedit.h6
-rw-r--r--plugingui/resource.h8
-rw-r--r--plugingui/scrollbar.h14
3 files changed, 15 insertions, 13 deletions
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 <limits>
+
#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;
};