// UPDATE
//////////////////////////////
- const unsigned int currentTime = currentFrameStartTime / NANOSECONDS_PER_MILLISECOND;
- const unsigned int nextFrameTime = currentTime + mDefaultFrameDurationMilliseconds;
+ const uint32_t currentTime = static_cast<uint32_t>(currentFrameStartTime / NANOSECONDS_PER_MILLISECOND);
+ const uint32_t nextFrameTime = currentTime + static_cast<uint32_t>(mDefaultFrameDurationMilliseconds);
uint64_t noOfFramesSinceLastUpdate = 1;
float frameDelta = 0.0f;
const std::vector<uint32_t>& offsets)
{
auto command = mCommandPool->AllocateCommand(CommandType::BIND_VERTEX_BUFFERS);
- command->bindVertexBuffers.vertexBufferBindingsCount = firstBinding + buffers.size();
+ command->bindVertexBuffers.vertexBufferBindingsCount = firstBinding + static_cast<uint32_t>(buffers.size());
auto pBindings = mCommandPool->Allocate<GLES::VertexBufferBindingDescriptor>(firstBinding + buffers.size());
command->bindVertexBuffers.vertexBufferBindings = pBindings;
// get the content length, -1 == size is not known
curl_easy_getinfo(curlHandle, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &size);
- if(size >= maximumAllowedSizeBytes)
+ if(static_cast<size_t>(size) >= maximumAllowedSizeBytes)
{
DALI_LOG_ERROR("File content length %f > max allowed %zu \"%s\" \n", size, maximumAllowedSizeBytes, url.c_str());
return false;
data.startIndex = 0;
data.endIndex = 0;
- size_t visualCharacterIndex = 0;
- size_t byteIndex = 0;
+ uint32_t visualCharacterIndex = 0;
+ size_t byteIndex = 0;
// iterate through null terminated string checking each character's position against the given byte position ( attr->end_index ).
char leadByte = preEditString[byteIndex];
ecoreKeyDownEvent.key = key.c_str();
ecoreKeyDownEvent.string = integKeyEvent.keyString.c_str();
ecoreKeyDownEvent.compose = compose.c_str();
- ecoreKeyDownEvent.timestamp = integKeyEvent.time;
+ ecoreKeyDownEvent.timestamp = static_cast<uint32_t>(integKeyEvent.time);
ecoreKeyDownEvent.modifiers = EcoreInputModifierToEcoreIMFModifier(integKeyEvent.keyModifier);
ecoreKeyDownEvent.locks = EcoreInputModifierToEcoreIMFLock(integKeyEvent.keyModifier);
ecoreKeyDownEvent.dev_name = deviceName.c_str();
ecoreKeyUpEvent.key = key.c_str();
ecoreKeyUpEvent.string = integKeyEvent.keyString.c_str();
ecoreKeyUpEvent.compose = compose.c_str();
- ecoreKeyUpEvent.timestamp = integKeyEvent.time;
+ ecoreKeyUpEvent.timestamp = static_cast<uint32_t>(integKeyEvent.time);
ecoreKeyUpEvent.modifiers = EcoreInputModifierToEcoreIMFModifier(integKeyEvent.keyModifier);
ecoreKeyUpEvent.locks = EcoreInputModifierToEcoreIMFLock(integKeyEvent.keyModifier);
ecoreKeyUpEvent.dev_name = deviceName.c_str();
/*
- * 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.
struct sockaddr clientAddress;
- socklen_t addressLength(sizeof(sockaddr_in));
+ socklen_t addressLength(static_cast<socklen_t>(sizeof(sockaddr_in)));
int clientFileDescriptor = accept(mSocketFileDescriptor, &clientAddress, &addressLength);
if(clientFileDescriptor == -1)
return false;
}
- bytesRead = read(mSocketFileDescriptor, buffer, bufferSizeInBytes);
+ bytesRead = static_cast<unsigned int>(read(mSocketFileDescriptor, buffer, bufferSizeInBytes));
return true;
}