Added some castings.
Change-Id: I97589cdb15e2f70844111cef3b02e73e09547496
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
{
case TextAbstraction::FontClient::GlyphBufferData::CompressionType::NO_COMPRESSION:
{
- bufferSize = outBufferData.width * outBufferData.height * Pixel::GetBytesPerPixel(outBufferData.format);
+ bufferSize = static_cast<size_t>(outBufferData.width) * static_cast<size_t>(outBufferData.height) * static_cast<size_t>(Pixel::GetBytesPerPixel(outBufferData.format));
compressedBuffer = (uint8_t*)malloc(bufferSize);
if(DALI_UNLIKELY(compressedBuffer == nullptr))
const bool considerPadding = (widthByte & 1) ? true : false;
// For BIT_PER_PIXEL_4 type, we can know final compressed buffer size immediatly.
- bufferSize = outBufferData.height * (componentCount + (considerPadding ? 1 : 0));
+ bufferSize = static_cast<size_t>(outBufferData.height) * static_cast<size_t>(componentCount + (considerPadding ? 1 : 0));
compressedBuffer = (uint8_t*)malloc(bufferSize);
if(DALI_UNLIKELY(compressedBuffer == nullptr))
{
}
// Copy embedded levels as fribidi_reorder_line() may change them.
- const uint32_t embeddedLevelsSize = numberOfCharacters * sizeof(FriBidiLevel);
- FriBidiLevel* embeddedLevels = reinterpret_cast<FriBidiLevel*>(malloc(embeddedLevelsSize));
+ const size_t embeddedLevelsSize = static_cast<std::size_t>(numberOfCharacters) * sizeof(FriBidiLevel);
+ FriBidiLevel* embeddedLevels = reinterpret_cast<FriBidiLevel*>(malloc(embeddedLevelsSize));
if(embeddedLevels)
{
memcpy(embeddedLevels, bidirectionalInfo->embeddedLevels + firstCharacterIndex, embeddedLevelsSize);
int fixedSizeIndex = 0;
for(; fixedSizeIndex < ftFace->num_fixed_sizes; ++fixedSizeIndex)
{
- const PointSize26Dot6 fixedSize = ftFace->available_sizes[fixedSizeIndex].size;
+ const PointSize26Dot6 fixedSize = static_cast<PointSize26Dot6>(ftFace->available_sizes[fixedSizeIndex].size);
DALI_LOG_INFO(gFontClientLogFilter, Debug::Verbose, " size index : %d, size : %d\n", fixedSizeIndex, fixedSize);
if(fixedSize >= requestedPointSize)
{
// The requested point size is bigger than the bigest fixed size.
fixedSizeIndex = ftFace->num_fixed_sizes - 1;
- actualPointSize = ftFace->available_sizes[fixedSizeIndex].size;
+ actualPointSize = static_cast<PointSize26Dot6>(ftFace->available_sizes[fixedSizeIndex].size);
}
DALI_LOG_INFO(gFontClientLogFilter, Debug::Verbose, " size index : %d, actual size : %d\n", fixedSizeIndex, actualPointSize);