From cefd64f42a9b455dd12c9ef35be99e27b801f418 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 3 Jan 2016 17:51:49 +0100 Subject: [PATCH] Changed: Cast to CRGBA* is faster than set8888 --- code/nel/src/misc/bitmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/src/misc/bitmap.cpp b/code/nel/src/misc/bitmap.cpp index 107f79e55..eef7386f7 100644 --- a/code/nel/src/misc/bitmap.cpp +++ b/code/nel/src/misc/bitmap.cpp @@ -443,14 +443,14 @@ bool CBitmap::isGrayscale() const uint32 *data = (uint32*)_Data[0].getPtr(); uint32 *endData = (uint32*)((uint8*)data + size); - NLMISC::CRGBA color; + NLMISC::CRGBA *color = NULL; // check if all alphas have the same value while(data < endData) { - color.set8888(*data); + color = (NLMISC::CRGBA*)data; - if (!color.isGray()) return false; + if (!color->isGray()) return false; ++data; }