[Scummvm-git-logs] scummvm master -> 460c192e67d9ad0b512811fdb90e98a1a0eba83d
digitall
547637+digitall at users.noreply.github.com
Mon Sep 30 03:54:04 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
460c192e67 DEVTOOLS: Fix GCC Compiler Warning in convbdf Tool
Commit: 460c192e67d9ad0b512811fdb90e98a1a0eba83d
https://github.com/scummvm/scummvm/commit/460c192e67d9ad0b512811fdb90e98a1a0eba83d
Author: D G Turner (digitall at scummvm.org)
Date: 2019-09-30T02:51:19+01:00
Commit Message:
DEVTOOLS: Fix GCC Compiler Warning in convbdf Tool
Changed paths:
devtools/convbdf.cpp
diff --git a/devtools/convbdf.cpp b/devtools/convbdf.cpp
index 31fdbd0..f12d4c1 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;
More information about the Scummvm-git-logs
mailing list