aboutsummaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorD G Turner2019-09-30 02:51:19 +0100
committerD G Turner2019-09-30 02:51:19 +0100
commit460c192e67d9ad0b512811fdb90e98a1a0eba83d (patch)
tree8d791b753c8edfeea6f48bf87485ff5af89f3975 /devtools
parentcb6b2a363167e9bcb5845c637d828b5af8bd873e (diff)
downloadscummvm-rg350-460c192e67d9ad0b512811fdb90e98a1a0eba83d.tar.gz
scummvm-rg350-460c192e67d9ad0b512811fdb90e98a1a0eba83d.tar.bz2
scummvm-rg350-460c192e67d9ad0b512811fdb90e98a1a0eba83d.zip
DEVTOOLS: Fix GCC Compiler Warning in convbdf Tool
Diffstat (limited to 'devtools')
-rw-r--r--devtools/convbdf.cpp33
1 files changed, 31 insertions, 2 deletions
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp
index 31fdbd0010..f12d4c1216 100644
--- a/devtools/convbdf.cpp
+++ b/devtools/convbdf.cpp
@@ -35,6 +35,17 @@
struct BdfBoundingBox {
int width, height;
int xOffset, yOffset;
+
+ void reset() {
+ width = 0;
+ height = 0;
+ xOffset = 0;
+ yOffset = 0;
+ }
+
+ BdfBoundingBox() {
+ reset();
+ }
};
struct BdfFont {
@@ -54,7 +65,26 @@ struct BdfFont {
unsigned char *advances;
BdfBoundingBox *boxes;
- BdfFont() : bitmaps(0), advances(0), boxes(0), familyName(0), slant(0) {
+ void reset() {
+ familyName = 0;
+ slant = 0;
+ maxAdvance = 0;
+ size = 0;
+ height = 0;
+ defaultBox.reset();
+ ascent = 0;
+
+ firstCharacter = 0;
+ defaultCharacter = 0;
+ numCharacters = 0;
+
+ bitmaps = 0;
+ advances = 0;
+ boxes = 0;
+ }
+
+ BdfFont() {
+ reset();
}
~BdfFont() {
@@ -131,7 +161,6 @@ int main(int argc, char *argv[]) {
std::string fontName;
std::string copyright;
BdfFont font;
- memset(&font, 0, sizeof(font));
font.ascent = -1;
font.defaultCharacter = -1;