diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2018-05-30 18:10:17 -0700 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2018-08-17 05:58:23 -0700 |
commit | 4acded149a8d73004ec7c9531e7745169390f8ac (patch) | |
tree | 143d94891dd8b804b2a17f3e65e304749aba9d99 | |
parent | e4744b3a001c77def19f67bd4457f361af7a3800 (diff) |
Peripherals: Fix compiler warning on Windows
-rw-r--r-- | xbmc/peripherals/addons/PeripheralAddon.cpp | 5 | ||||
-rw-r--r-- | xbmc/platform/android/peripherals/AndroidJoystickState.h | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/xbmc/peripherals/addons/PeripheralAddon.cpp b/xbmc/peripherals/addons/PeripheralAddon.cpp index f96d2a1d62..dea4657f89 100644 --- a/xbmc/peripherals/addons/PeripheralAddon.cpp +++ b/xbmc/peripherals/addons/PeripheralAddon.cpp @@ -630,12 +630,13 @@ bool CPeripheralAddon::SetIgnoredPrimitives(const CPeripheral* device, const Pri JOYSTICK_DRIVER_PRIMITIVE* addonPrimitives = nullptr; kodi::addon::DriverPrimitives::ToStructs(primitives, &addonPrimitives); + const unsigned int primitiveCount = static_cast<unsigned int>(primitives.size()); LogError(retVal = m_struct.toAddon.set_ignored_primitives(&m_struct, &joystickStruct, - primitives.size(), addonPrimitives), "SetIgnoredPrimitives()"); + primitiveCount, addonPrimitives), "SetIgnoredPrimitives()"); kodi::addon::Joystick::FreeStruct(joystickStruct); - kodi::addon::DriverPrimitives::FreeStructs(primitives.size(), addonPrimitives); + kodi::addon::DriverPrimitives::FreeStructs(primitiveCount, addonPrimitives); return retVal == PERIPHERAL_NO_ERROR; } diff --git a/xbmc/platform/android/peripherals/AndroidJoystickState.h b/xbmc/platform/android/peripherals/AndroidJoystickState.h index cd5f097c62..efe3d3e622 100644 --- a/xbmc/platform/android/peripherals/AndroidJoystickState.h +++ b/xbmc/platform/android/peripherals/AndroidJoystickState.h @@ -27,9 +27,9 @@ namespace PERIPHERALS int GetDeviceId() const { return m_deviceId; } - unsigned int GetButtonCount() const { return m_buttons.size(); } - unsigned int GetHatCount() const { return m_hats.size(); } - unsigned int GetAxisCount() const { return m_axes.size(); } + unsigned int GetButtonCount() const { return static_cast<unsigned int>(m_buttons.size()); } + unsigned int GetHatCount() const { return static_cast<unsigned int>(m_hats.size()); } + unsigned int GetAxisCount() const { return static_cast<unsigned int>(m_axes.size()); } /*! * Initialize the joystick object. Joystick will be initialized before the |