summaryrefslogtreecommitdiff
path: root/modules/text_server_adv/dynamic_font_adv.h
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-02-08 10:57:18 +0100
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-02-08 10:57:18 +0100
commitf7209b459b4faaae9d93bfb6ac5346eb41787f92 (patch)
tree790808a314837cd3f16c9d229401882046bd6fae /modules/text_server_adv/dynamic_font_adv.h
parent57e2822a05c29db3980ad243c37a34acf6c4d14b (diff)
Initialize class/struct variables with default values in modules/
Diffstat (limited to 'modules/text_server_adv/dynamic_font_adv.h')
-rw-r--r--modules/text_server_adv/dynamic_font_adv.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/text_server_adv/dynamic_font_adv.h b/modules/text_server_adv/dynamic_font_adv.h
index c35dd9390b..cd538cb8e1 100644
--- a/modules/text_server_adv/dynamic_font_adv.h
+++ b/modules/text_server_adv/dynamic_font_adv.h
@@ -74,14 +74,11 @@ private:
uint32_t size : 16;
uint32_t outline_size : 16;
};
- uint32_t key;
+ uint32_t key = 0;
};
bool operator<(CacheID right) const {
return key < right.key;
}
- CacheID() {
- key = 0;
- }
};
struct DataAtSize {
@@ -91,10 +88,10 @@ private:
int size = 0;
float scale_color_font = 1.f;
- float ascent = 0;
- float descent = 0;
- float underline_position = 0;
- float underline_thickness = 0;
+ float ascent = 0.0;
+ float descent = 0.0;
+ float underline_position = 0.0;
+ float underline_thickness = 0.0;
Vector<CharTexture> textures;
HashMap<uint32_t, Character> glyph_map;