From: Brendan Le Foll Date: Thu, 7 Aug 2014 19:38:45 +0000 (+0100) Subject: sm130: fix std::min call having issues with template argument dedudction X-Git-Tag: v0.1.6~6 X-Git-Url: http://review.tizen.org/git/?p=contrib%2Fupm.git;a=commitdiff_plain;h=5ed36a37f9619fd8584bfebbe27e00e15afd693e sm130: fix std::min call having issues with template argument dedudction Signed-off-by: Brendan Le Foll --- diff --git a/src/sm130/sm130.cxx b/src/sm130/sm130.cxx index 786dd85..2bb48bb 100644 --- a/src/sm130/sm130.cxx +++ b/src/sm130/sm130.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include "sm130.h" @@ -150,7 +151,7 @@ SM130::available () { case CMD_RESET: case CMD_VERSION: // RESET and VERSION commands produce the firmware version - len = std::min ((unsigned int) getPacketLength (), sizeof (this->m_Version)) - 1; + len = std::min ((unsigned int) getPacketLength(), (unsigned int) sizeof(this->m_Version)) - 1; memcpy(this->m_Version, this->m_Data + 2, len); this->m_Version[len] = 0; break;