aboutsummaryrefslogtreecommitdiff
path: root/saga/font.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2005-01-02 14:52:11 +0000
committerTorbjörn Andersson2005-01-02 14:52:11 +0000
commit5f6108052e24fbf4a309ae5c315278b992d76ede (patch)
treed25d5d688dfe3f767f9ffb40469153662444278c /saga/font.cpp
parent1bc636aaa676839c6e8fe2d8cc1405f2c3b2393c (diff)
downloadscummvm-rg350-5f6108052e24fbf4a309ae5c315278b992d76ede.tar.gz
scummvm-rg350-5f6108052e24fbf4a309ae5c315278b992d76ede.tar.bz2
scummvm-rg350-5f6108052e24fbf4a309ae5c315278b992d76ede.zip
Changed "sizeof x" to "sizeof(x)" for consistency with the rest of ScummVM,
and used ARRAYSIZE() instead in two cases. svn-id: r16408
Diffstat (limited to 'saga/font.cpp')
-rw-r--r--saga/font.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/saga/font.cpp b/saga/font.cpp
index cc65e53757..9814540d8c 100644
--- a/saga/font.cpp
+++ b/saga/font.cpp
@@ -47,7 +47,7 @@ Font::Font(SagaEngine *vm) : _vm(vm), _initialized(false) {
assert(_nFonts > 0);
- _fonts = (FONT **)malloc(_nFonts * sizeof *_fonts);
+ _fonts = (FONT **)malloc(_nFonts * sizeof(*_fonts));
if (_fonts == NULL) {
error("Font::Font(): Memory allocation failure.");
}
@@ -109,7 +109,7 @@ int Font::loadFont(uint32 font_rn, int font_id) {
MemoryReadStreamEndian readS(fontres_p, fontres_len, IS_BIG_ENDIAN);
// Create new font structure
- font = (FONT *)malloc(sizeof *font);
+ font = (FONT *)malloc(sizeof(*font));
if (font == NULL) {
error("Font:loadFont(): Memory allocation error.");
return MEM;
@@ -127,7 +127,7 @@ int Font::loadFont(uint32 font_rn, int font_id) {
debug(2, "Row padding: %d", fh.row_length);
// Create normal font style
- normal_font = (FONT_STYLE *)malloc(sizeof *normal_font);
+ normal_font = (FONT_STYLE *)malloc(sizeof(*normal_font));
if (normal_font == NULL) {
error("Font::loadFont(): Memory allocation error.");
free(font);
@@ -215,14 +215,14 @@ FONT_STYLE *Font::createOutline(FONT_STYLE *src_font) {
unsigned char c_rep;
// Create new font style structure
- new_font = (FONT_STYLE *)malloc(sizeof *new_font);
+ new_font = (FONT_STYLE *)malloc(sizeof(*new_font));
if (new_font == NULL) {
error("Font::createOutline(): Memory allocation error.");
return NULL;
}
- memset(new_font, 0, sizeof *new_font);
+ memset(new_font, 0, sizeof(*new_font));
// Populate new font style character data
for (i = 0; i < FONT_CHARCOUNT; i++) {