diff options
author | Eunki, Hong <eunkiki.hong@samsung.com> | 2022-10-06 20:10:50 +0900 |
---|---|---|
committer | Eunki, Hong <eunkiki.hong@samsung.com> | 2022-10-18 21:34:43 +0900 |
commit | 4387b0de650b6f0fd8b1b7c44b71841ca628d977 (patch) | |
tree | 45ef26192901b6eb6ff0f4d9500b07445bbc3310 /dali/internal | |
parent | 38b2cd4c868982264a00fa6f16fa01bf136e81e8 (diff) | |
download | dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.tar.gz dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.tar.bz2 dali-adaptor-4387b0de650b6f0fd8b1b7c44b71841ca628d977.zip |
Minor coverity issue fixes
Fix some minor coverity issues that might has meanful
1. Implement missing move operation.
2. Remove float equal checks by ==, != operator.
3. unsigned int / unsigned char to uint32_t / uint8_t
4. Change missed value type (a.k.a float v = true;)
Change-Id: Ib6eb901919918488f2ff7085301e73a466b98019
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Diffstat (limited to 'dali/internal')
-rw-r--r-- | dali/internal/accessibility/bridge/bridge-accessible.cpp | 11 | ||||
-rw-r--r-- | dali/internal/graphics/gles-impl/gles-context.cpp | 11 | ||||
-rw-r--r-- | dali/internal/imaging/common/image-operations.cpp | 74 | ||||
-rw-r--r-- | dali/internal/imaging/common/pixel-buffer-impl.cpp | 70 | ||||
-rw-r--r-- | dali/internal/imaging/common/pixel-buffer-impl.h | 40 |
5 files changed, 104 insertions, 102 deletions
diff --git a/dali/internal/accessibility/bridge/bridge-accessible.cpp b/dali/internal/accessibility/bridge/bridge-accessible.cpp index 12366470d..31443ffa1 100644 --- a/dali/internal/accessibility/bridge/bridge-accessible.cpp +++ b/dali/internal/accessibility/bridge/bridge-accessible.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +19,8 @@ #include <dali/internal/accessibility/bridge/bridge-accessible.h> // EXTERNAL INCLUDES +#include <dali/public-api/math/math-utils.h> + #include <algorithm> #include <iostream> @@ -60,7 +62,7 @@ std::vector<std::vector<Component*>> SplitLines(const std::vector<Component*>& c // Find first with non-zero area auto first = std::find_if(children.begin(), children.end(), [](Component* child) -> bool { auto extents = child->GetExtents(CoordinateType::WINDOW); - return extents.height != 0.0f && extents.width != 0.0f; + return !Dali::EqualsZero(extents.height) && !Dali::EqualsZero(extents.width); }); if(first == children.end()) @@ -78,7 +80,7 @@ std::vector<std::vector<Component*>> SplitLines(const std::vector<Component*>& c auto child = *it; rect = child->GetExtents(CoordinateType::WINDOW); - if(rect.height == 0.0f || rect.width == 0.0f) + if(Dali::EqualsZero(rect.height) || Dali::EqualsZero(rect.width)) { // Zero area, ignore continue; @@ -156,7 +158,7 @@ static bool IsObjectZeroSize(Component* obj) return false; } auto extents = obj->GetExtents(CoordinateType::WINDOW); - return extents.height == 0 || extents.width == 0; + return Dali::EqualsZero(extents.height) || Dali::EqualsZero(extents.width); } static bool IsObjectAcceptable(Component* obj) @@ -266,7 +268,6 @@ static std::string MakeIndent(unsigned int maxRecursionDepth) return std::string(GET_NAVIGABLE_AT_POINT_MAX_RECURSION_DEPTH - maxRecursionDepth, ' '); } - static bool IsRoleAcceptableWhenNavigatingNextPrev(Accessible* obj) { if(!obj) diff --git a/dali/internal/graphics/gles-impl/gles-context.cpp b/dali/internal/graphics/gles-impl/gles-context.cpp index 06de56a46..ff38d4469 100644 --- a/dali/internal/graphics/gles-impl/gles-context.cpp +++ b/dali/internal/graphics/gles-impl/gles-context.cpp @@ -20,6 +20,7 @@ #include <dali/integration-api/gl-abstraction.h> #include <dali/integration-api/gl-defines.h> #include <dali/internal/graphics/common/graphics-interface.h> +#include <dali/public-api/math/math-utils.h> #include "egl-graphics-controller.h" #include "gles-graphics-buffer.h" @@ -650,11 +651,11 @@ void Context::BeginRenderPass(const BeginRenderPassDescriptor& renderPassBegin) const auto clearValues = renderPassBegin.clearValues.Ptr(); - if(!mImpl->mGlStateCache.mClearColorSet || - mImpl->mGlStateCache.mClearColor.r != clearValues[0].color.r || - mImpl->mGlStateCache.mClearColor.g != clearValues[0].color.g || - mImpl->mGlStateCache.mClearColor.b != clearValues[0].color.b || - mImpl->mGlStateCache.mClearColor.a != clearValues[0].color.a) + if(!Dali::Equals(mImpl->mGlStateCache.mClearColor.r, clearValues[0].color.r) || + !Dali::Equals(mImpl->mGlStateCache.mClearColor.g, clearValues[0].color.g) || + !Dali::Equals(mImpl->mGlStateCache.mClearColor.b, clearValues[0].color.b) || + !Dali::Equals(mImpl->mGlStateCache.mClearColor.a, clearValues[0].color.a) || + !mImpl->mGlStateCache.mClearColorSet) { gl.ClearColor(clearValues[0].color.r, clearValues[0].color.g, diff --git a/dali/internal/imaging/common/image-operations.cpp b/dali/internal/imaging/common/image-operations.cpp index 675388efd..6123e61b1 100644 --- a/dali/internal/imaging/common/image-operations.cpp +++ b/dali/internal/imaging/common/image-operations.cpp @@ -2289,19 +2289,19 @@ void Resample(const unsigned char* __restrict__ inPixels, } } -void LanczosSample4BPP(const unsigned char* __restrict__ inPixels, +void LanczosSample4BPP(const uint8_t* __restrict__ inPixels, ImageDimensions inputDimensions, - unsigned int inputStride, - unsigned char* __restrict__ outPixels, + uint32_t inputStride, + uint8_t* __restrict__ outPixels, ImageDimensions desiredDimensions) { Resample(inPixels, inputDimensions, inputStride, outPixels, desiredDimensions, Resampler::LANCZOS4, 4, true); } -void LanczosSample1BPP(const unsigned char* __restrict__ inPixels, +void LanczosSample1BPP(const uint8_t* __restrict__ inPixels, ImageDimensions inputDimensions, - unsigned int inputStride, - unsigned char* __restrict__ outPixels, + uint32_t inputStride, + uint8_t* __restrict__ outPixels, ImageDimensions desiredDimensions) { // For L8 images @@ -2309,11 +2309,11 @@ void LanczosSample1BPP(const unsigned char* __restrict__ inPixels, } // Dispatch to a format-appropriate third-party resampling function: -void LanczosSample(const unsigned char* __restrict__ inPixels, +void LanczosSample(const uint8_t* __restrict__ inPixels, ImageDimensions inDimensions, - unsigned int inStride, + uint32_t inStride, Pixel::Format pixelFormat, - unsigned char* __restrict__ outPixels, + uint8_t* __restrict__ outPixels, ImageDimensions outDimensions) { // Check the pixel format is one that is supported: @@ -2341,25 +2341,25 @@ void LanczosSample(const unsigned char* __restrict__ inPixels, } else { - DALI_LOG_INFO(gImageOpsLogFilter, Dali::Integration::Log::Verbose, "Bitmap was not lanczos sampled: unsupported pixel format: %u.\n", unsigned(pixelFormat)); + DALI_LOG_INFO(gImageOpsLogFilter, Dali::Integration::Log::Verbose, "Bitmap was not lanczos sampled: unsupported pixel format: %u.\n", static_cast<uint32_t>(pixelFormat)); } } void RotateByShear(const uint8_t* const pixelsIn, - unsigned int widthIn, - unsigned int heightIn, - unsigned int strideIn, - unsigned int pixelSize, + uint32_t widthIn, + uint32_t heightIn, + uint32_t strideIn, + uint32_t pixelSize, float radians, uint8_t*& pixelsOut, - unsigned int& widthOut, - unsigned int& heightOut) + uint32_t& widthOut, + uint32_t& heightOut) { // @note Code got from https://www.codeproject.com/Articles/202/High-quality-image-rotation-rotate-by-shear by Eran Yariv. // Do first the fast rotations to transform the angle into a (-45..45] range. - float fastRotationPerformed = false; + bool fastRotationPerformed = false; if((radians > Math::PI_4) && (radians <= RAD_135)) { // Angle in (45.0 .. 135.0] @@ -2447,7 +2447,7 @@ void RotateByShear(const uint8_t* const pixelsIn, const uint8_t* const firstHorizontalSkewPixelsIn = fastRotationPerformed ? pixelsOut : pixelsIn; std::unique_ptr<uint8_t, void (*)(void*)> tmpPixelsInPtr((fastRotationPerformed ? pixelsOut : nullptr), free); - unsigned int stride = fastRotationPerformed ? widthOut : strideIn; + uint32_t stride = fastRotationPerformed ? widthOut : strideIn; // Reset the input/output widthIn = widthOut; @@ -2464,7 +2464,7 @@ void RotateByShear(const uint8_t* const pixelsIn, // Calculate first shear (horizontal) destination image dimensions - widthOut = widthIn + static_cast<unsigned int>(fabs(angleTangent) * static_cast<float>(heightIn)); + widthOut = widthIn + static_cast<uint32_t>(fabs(angleTangent) * static_cast<float>(heightIn)); heightOut = heightIn; // Allocate the buffer for the 1st shear @@ -2482,7 +2482,7 @@ void RotateByShear(const uint8_t* const pixelsIn, return; } - for(unsigned int y = 0u; y < heightOut; ++y) + for(uint32_t y = 0u; y < heightOut; ++y) { const float shear = angleTangent * ((angleTangent >= 0.f) ? (0.5f + static_cast<float>(y)) : (0.5f + static_cast<float>(y) - static_cast<float>(heightOut))); @@ -2492,8 +2492,8 @@ void RotateByShear(const uint8_t* const pixelsIn, // Reset the 'pixel in' pointer with the output of the 'First Horizontal Skew' and free the memory allocated by the 'Fast Rotations'. tmpPixelsInPtr.reset(pixelsOut); - unsigned int tmpWidthIn = widthOut; - unsigned int tmpHeightIn = heightOut; + uint32_t tmpWidthIn = widthOut; + uint32_t tmpHeightIn = heightOut; // Reset the input/output pixelsOut = nullptr; @@ -2503,7 +2503,7 @@ void RotateByShear(const uint8_t* const pixelsIn, /////////////////////////////////////// // Calc 2nd shear (vertical) destination image dimensions - heightOut = static_cast<unsigned int>(static_cast<float>(widthIn) * fabs(angleSinus) + static_cast<float>(heightIn) * angleCosinus); + heightOut = static_cast<uint32_t>(static_cast<float>(widthIn) * fabs(angleSinus) + static_cast<float>(heightIn) * angleCosinus); // Allocate the buffer for the 2nd shear pixelsOut = static_cast<uint8_t*>(malloc(widthOut * heightOut * pixelSize)); @@ -2522,10 +2522,10 @@ void RotateByShear(const uint8_t* const pixelsIn, // Variable skew offset float offset = angleSinus * ((angleSinus > 0.f) ? static_cast<float>(widthIn - 1u) : -(static_cast<float>(widthIn) - static_cast<float>(widthOut))); - unsigned int column = 0u; + uint32_t column = 0u; for(column = 0u; column < widthOut; ++column, offset -= angleSinus) { - const int shear = static_cast<int>(floor(offset)); + const int32_t shear = static_cast<int32_t>(floor(offset)); VerticalSkew(tmpPixelsInPtr.get(), tmpWidthIn, tmpHeightIn, tmpWidthIn, pixelSize, pixelsOut, widthOut, heightOut, column, shear, offset - static_cast<float>(shear)); } // Reset the 'pixel in' pointer with the output of the 'Vertical Skew' and free the memory allocated by the 'First Horizontal Skew'. @@ -2540,7 +2540,7 @@ void RotateByShear(const uint8_t* const pixelsIn, /////////////////////////////////////// // Calc 3rd shear (horizontal) destination image dimensions - widthOut = static_cast<unsigned int>(static_cast<float>(heightIn) * fabs(angleSinus) + static_cast<float>(widthIn) * angleCosinus) + 1u; + widthOut = static_cast<uint32_t>(static_cast<float>(heightIn) * fabs(angleSinus) + static_cast<float>(widthIn) * angleCosinus) + 1u; // Allocate the buffer for the 3rd shear pixelsOut = static_cast<uint8_t*>(malloc(widthOut * heightOut * pixelSize)); @@ -2558,9 +2558,9 @@ void RotateByShear(const uint8_t* const pixelsIn, offset = (angleSinus >= 0.f) ? -angleSinus * angleTangent * static_cast<float>(widthIn - 1u) : angleTangent * (static_cast<float>(widthIn - 1u) * -angleSinus + (1.f - static_cast<float>(heightOut))); - for(unsigned int y = 0u; y < heightOut; ++y, offset += angleTangent) + for(uint32_t y = 0u; y < heightOut; ++y, offset += angleTangent) { - const int shear = static_cast<int>(floor(offset)); + const int32_t shear = static_cast<int32_t>(floor(offset)); HorizontalSkew(tmpPixelsInPtr.get(), tmpWidthIn, tmpWidthIn, pixelSize, pixelsOut, widthOut, y, shear, offset - static_cast<float>(shear)); } @@ -2569,14 +2569,14 @@ void RotateByShear(const uint8_t* const pixelsIn, } void HorizontalShear(const uint8_t* const pixelsIn, - unsigned int widthIn, - unsigned int heightIn, - unsigned int strideIn, - unsigned int pixelSize, + uint32_t widthIn, + uint32_t heightIn, + uint32_t strideIn, + uint32_t pixelSize, float radians, uint8_t*& pixelsOut, - unsigned int& widthOut, - unsigned int& heightOut) + uint32_t& widthOut, + uint32_t& heightOut) { // Calculate the destination image dimensions. @@ -2592,7 +2592,7 @@ void HorizontalShear(const uint8_t* const pixelsIn, return; } - widthOut = widthIn + static_cast<unsigned int>(ceil(absRadians * static_cast<float>(heightIn))); + widthOut = widthIn + static_cast<uint32_t>(ceil(absRadians * static_cast<float>(heightIn))); heightOut = heightIn; // Allocate the buffer for the shear. @@ -2607,11 +2607,11 @@ void HorizontalShear(const uint8_t* const pixelsIn, return; } - for(unsigned int y = 0u; y < heightOut; ++y) + for(uint32_t y = 0u; y < heightOut; ++y) { const float shear = radians * ((radians >= 0.f) ? (0.5f + static_cast<float>(y)) : (0.5f + static_cast<float>(y) - static_cast<float>(heightOut))); - const int intShear = static_cast<int>(floor(shear)); + const int32_t intShear = static_cast<int32_t>(floor(shear)); HorizontalSkew(pixelsIn, widthIn, strideIn, pixelSize, pixelsOut, widthOut, y, intShear, shear - static_cast<float>(intShear)); } } diff --git a/dali/internal/imaging/common/pixel-buffer-impl.cpp b/dali/internal/imaging/common/pixel-buffer-impl.cpp index 533db6849..f4a174343 100644 --- a/dali/internal/imaging/common/pixel-buffer-impl.cpp +++ b/dali/internal/imaging/common/pixel-buffer-impl.cpp @@ -43,11 +43,11 @@ constexpr uint32_t BRIGHTNESS_CONSTANT_G = 587; constexpr uint32_t BRIGHTNESS_CONSTANT_B = 114; } // namespace -PixelBuffer::PixelBuffer(unsigned char* buffer, - unsigned int bufferSize, - unsigned int width, - unsigned int height, - unsigned int stride, +PixelBuffer::PixelBuffer(uint8_t* buffer, + uint32_t bufferSize, + uint32_t width, + uint32_t height, + uint32_t stride, Dali::Pixel::Format pixelFormat) : mMetadata(), mBuffer(buffer), @@ -65,24 +65,24 @@ PixelBuffer::~PixelBuffer() ReleaseBuffer(); } -PixelBufferPtr PixelBuffer::New(unsigned int width, - unsigned int height, +PixelBufferPtr PixelBuffer::New(uint32_t width, + uint32_t height, Dali::Pixel::Format pixelFormat) { - unsigned int bufferSize = width * height * Dali::Pixel::GetBytesPerPixel(pixelFormat); - unsigned char* buffer = NULL; + uint32_t bufferSize = width * height * Dali::Pixel::GetBytesPerPixel(pixelFormat); + uint8_t* buffer = NULL; if(bufferSize > 0) { - buffer = static_cast<unsigned char*>(malloc(bufferSize)); + buffer = static_cast<uint8_t*>(malloc(bufferSize)); } return new PixelBuffer(buffer, bufferSize, width, height, width, pixelFormat); } -PixelBufferPtr PixelBuffer::New(unsigned char* buffer, - unsigned int bufferSize, - unsigned int width, - unsigned int height, - unsigned int stride, +PixelBufferPtr PixelBuffer::New(uint8_t* buffer, + uint32_t bufferSize, + uint32_t width, + uint32_t height, + uint32_t stride, Dali::Pixel::Format pixelFormat) { return new PixelBuffer(buffer, bufferSize, width, height, stride, pixelFormat); @@ -106,12 +106,12 @@ Dali::PixelData PixelBuffer::Convert(PixelBuffer& pixelBuffer) return pixelData; } -unsigned int PixelBuffer::GetWidth() const +uint32_t PixelBuffer::GetWidth() const { return mWidth; } -unsigned int PixelBuffer::GetHeight() const +uint32_t PixelBuffer::GetHeight() const { return mHeight; } @@ -126,28 +126,28 @@ Dali::Pixel::Format PixelBuffer::GetPixelFormat() const return mPixelFormat; } -unsigned char* PixelBuffer::GetBuffer() const +uint8_t* PixelBuffer::GetBuffer() const { return mBuffer; } -const unsigned char* const PixelBuffer::GetConstBuffer() const +const uint8_t* PixelBuffer::GetConstBuffer() const { return mBuffer; } -unsigned int PixelBuffer::GetBufferSize() const +uint32_t PixelBuffer::GetBufferSize() const { return mBufferSize; } Dali::PixelData PixelBuffer::CreatePixelData() const { - unsigned char* destBuffer = NULL; + uint8_t* destBuffer = NULL; if(mBufferSize > 0) { - destBuffer = static_cast<unsigned char*>(malloc(mBufferSize)); + destBuffer = static_cast<uint8_t*>(malloc(mBufferSize)); memcpy(destBuffer, mBuffer, mBufferSize); } @@ -349,12 +349,12 @@ PixelBufferPtr PixelBuffer::NewCrop(const PixelBuffer& inBuffer, uint16_t x, uin destStride = (inBuffer.mWidth - x) * bytesPerPixel; } - int srcOffset = x * bytesPerPixel + y * srcStride; - int destOffset = 0; - unsigned char* destBuffer = outBuffer->mBuffer; + int srcOffset = x * bytesPerPixel + y * srcStride; + int destOffset = 0; + uint8_t* destBuffer = outBuffer->mBuffer; // Clamp crop to last row - unsigned int endRow = y + cropDimensions.GetHeight(); + uint16_t endRow = y + cropDimensions.GetHeight(); if(endRow > inBuffer.mHeight) { endRow = inBuffer.mHeight - 1; @@ -456,9 +456,9 @@ void PixelBuffer::MultiplyColorByAlpha() // must be skipped in such case if(Pixel::GetBytesPerPixel(mPixelFormat) && Pixel::HasAlpha(mPixelFormat)) { - unsigned char* pixel = mBuffer; - const unsigned int strideBytes = mStride * bytesPerPixel; - const unsigned int widthBytes = mWidth * bytesPerPixel; + uint8_t* pixel = mBuffer; + const uint32_t strideBytes = mStride * bytesPerPixel; + const uint32_t widthBytes = mWidth * bytesPerPixel; // Collect all valid channel list before lookup whole buffer std::vector<Channel> validChannelList; @@ -472,11 +472,11 @@ void PixelBuffer::MultiplyColorByAlpha() if(DALI_LIKELY(!validChannelList.empty())) { - for(unsigned int y = 0; y < mHeight; y++) + for(uint32_t y = 0; y < mHeight; y++) { - for(unsigned int x = 0; x < widthBytes; x += bytesPerPixel) + for(uint32_t x = 0; x < widthBytes; x += bytesPerPixel) { - unsigned int alpha = ReadChannel(&pixel[x], mPixelFormat, Adaptor::ALPHA); + uint32_t alpha = ReadChannel(&pixel[x], mPixelFormat, Adaptor::ALPHA); if(alpha < 255) { // If alpha is 255, we don't need to change color. Skip current pixel @@ -515,7 +515,7 @@ uint32_t PixelBuffer::GetBrightness() const if(bytesPerPixel && mWidth && mHeight) { - unsigned char* pixel = mBuffer; + uint8_t* pixel = mBuffer; const uint32_t strideBytes = mStride * bytesPerPixel; const uint32_t widthBytes = mWidth * bytesPerPixel; const uint32_t bufferSize = mWidth * mHeight; @@ -524,9 +524,9 @@ uint32_t PixelBuffer::GetBrightness() const uint64_t green = 0; uint64_t blue = 0; - for(unsigned int y = 0; y < mHeight; y++) + for(uint32_t y = 0; y < mHeight; y++) { - for(unsigned int x = 0; x < widthBytes; x += bytesPerPixel) + for(uint32_t x = 0; x < widthBytes; x += bytesPerPixel) { red += ReadChannel(&pixel[x], mPixelFormat, Adaptor::RED); green += ReadChannel(&pixel[x], mPixelFormat, Adaptor::GREEN); diff --git a/dali/internal/imaging/common/pixel-buffer-impl.h b/dali/internal/imaging/common/pixel-buffer-impl.h index 6e02f3c41..0866dd489 100644 --- a/dali/internal/imaging/common/pixel-buffer-impl.h +++ b/dali/internal/imaging/common/pixel-buffer-impl.h @@ -49,8 +49,8 @@ public: * @param [in] height Buffer height in pixels * @param [in] pixelFormat The pixel format */ - static PixelBufferPtr New(unsigned int width, - unsigned int height, + static PixelBufferPtr New(uint32_t width, + uint32_t height, Pixel::Format pixelFormat); /** @@ -63,12 +63,12 @@ public: * @param [in] stride Buffer stride in pixels, 0 means the buffer is tightly packed * @param [in] pixelFormat The pixel format */ - static PixelBufferPtr New(unsigned char* buffer, - unsigned int bufferSize, - unsigned int width, - unsigned int height, - unsigned int stride, - Pixel::Format pixelFormat); + static PixelBufferPtr New(uint8_t* buffer, + uint32_t bufferSize, + uint32_t width, + uint32_t height, + uint32_t stride, + Pixel::Format pixelFormat); /** * Convert a pixelBuffer object into a PixelData object. @@ -89,12 +89,12 @@ public: * @param [in] stride Buffer stride in pixels, 0 means the buffer is tightly packed * @param [in] pixelFormat The pixel format */ - PixelBuffer(unsigned char* buffer, - unsigned int bufferSize, - unsigned int width, - unsigned int height, - unsigned int stride, - Pixel::Format pixelFormat); + PixelBuffer(uint8_t* buffer, + uint32_t bufferSize, + uint32_t width, + uint32_t height, + uint32_t stride, + Pixel::Format pixelFormat); protected: /** @@ -109,19 +109,19 @@ public: * Get the width of the buffer in pixels. * @return The width of the buffer in pixels */ - unsigned int GetWidth() const; + uint32_t GetWidth() const; /** * Get the height of the buffer in pixels * @return The height of the buffer in pixels */ - unsigned int GetHeight() const; + uint32_t GetHeight() const; /** * @brief Gets the stride of the buffer in pixels. * @return The stride of the buffer in pixels. 0 means the buffer is tightly packed. */ - unsigned int GetStride() const; + uint32_t GetStride() const; /** * Get the pixel format @@ -133,18 +133,18 @@ public: * Get the pixel buffer if it's present. * @return The buffer if exists, or NULL if there is no pixel buffer. */ - unsigned char* GetBuffer() const; + uint8_t* GetBuffer() const; /** * @copydoc Devel::PixelBuffer::GetBuffer() */ - const unsigned char* const GetConstBuffer() const; + const uint8_t* GetConstBuffer() const; /** * Get the size of the buffer in bytes * @return The size of the buffer */ - unsigned int GetBufferSize() const; + uint32_t GetBufferSize() const; /** * Copy the buffer into a new PixelData |