From 09b4a0675e95e003ccea691f1c9e5a95aec4149c Mon Sep 17 00:00:00 2001 From: yinsimei Date: Tue, 6 Jun 2017 10:25:03 +0200 Subject: SLUDGE: remove value setting loop by memset --- engines/sludge/sprites.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'engines/sludge') diff --git a/engines/sludge/sprites.cpp b/engines/sludge/sprites.cpp index dbbf74cb5c..b6701d4fa3 100644 --- a/engines/sludge/sprites.cpp +++ b/engines/sludge/sprites.cpp @@ -187,10 +187,7 @@ bool loadSpriteBank(int fileNum, spriteBank &loadhere, bool isFont) { } data = (byte *)new byte[picwidth * (picheight + 1)]; if (!checkNew(data)) return false; - int ooo = picwidth * picheight; - for (int tt = 0; tt < picwidth; tt++) { - data[ooo++] = 0; - } + memset(data + picwidth * picheight, 0, picwidth); spriteData[i] = data; // read color -- cgit v1.2.3