X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Flib%2Fimplementations%2FCECCommandHandler.cpp;h=5df30f44a272a172ba5e7fb65dfefe46696a96b7;hb=6f14b51266d3af3f215171a4a5fca5be011c023e;hp=bed4ff9fbb33eac6d48be69a8b46673016fd1b25;hpb=a9056daaa4fa20d8048be09ff9dba8b392c7d3d8;p=deb_libcec.git diff --git a/src/lib/implementations/CECCommandHandler.cpp b/src/lib/implementations/CECCommandHandler.cpp index bed4ff9..5df30f4 100644 --- a/src/lib/implementations/CECCommandHandler.cpp +++ b/src/lib/implementations/CECCommandHandler.cpp @@ -426,7 +426,7 @@ bool CCECCommandHandler::HandleRequestActiveSource(const cec_command &command) m_busDevice->AddLog(CEC_LOG_DEBUG, strLog.c_str()); vector devices; - for (int iDevicePtr = (int)GetMyDevices(devices)-1; iDevicePtr >=0; iDevicePtr--) + for (int iDevicePtr = GetMyDevices(devices) - 1; iDevicePtr >=0; iDevicePtr--) devices[iDevicePtr]->TransmitActiveSource(); return true; @@ -651,9 +651,9 @@ void CCECCommandHandler::UnhandledCommand(const cec_command &command) m_busDevice->AddLog(CEC_LOG_DEBUG, strLog); } -unsigned int CCECCommandHandler::GetMyDevices(vector &devices) const +size_t CCECCommandHandler::GetMyDevices(vector &devices) const { - unsigned int iReturn(0); + size_t iReturn(0); cec_logical_addresses addresses = m_processor->GetLogicalAddresses(); for (uint8_t iPtr = 0; iPtr < 16; iPtr++) @@ -842,7 +842,7 @@ bool CCECCommandHandler::TransmitOSDName(const cec_logical_address iInitiator, c { cec_command command; cec_command::Format(command, iInitiator, iDestination, CEC_OPCODE_SET_OSD_NAME); - for (unsigned int iPtr = 0; iPtr < strDeviceName.length(); iPtr++) + for (size_t iPtr = 0; iPtr < strDeviceName.length(); iPtr++) command.parameters.PushBack(strDeviceName.at(iPtr)); return Transmit(command, false); @@ -854,10 +854,10 @@ bool CCECCommandHandler::TransmitOSDString(const cec_logical_address iInitiator, cec_command::Format(command, iInitiator, iDestination, CEC_OPCODE_SET_OSD_STRING); command.parameters.PushBack((uint8_t)duration); - unsigned int iLen = strlen(strMessage); + size_t iLen = strlen(strMessage); if (iLen > 13) iLen = 13; - for (unsigned int iPtr = 0; iPtr < iLen; iPtr++) + for (size_t iPtr = 0; iPtr < iLen; iPtr++) command.parameters.PushBack(strMessage[iPtr]); return Transmit(command, false);