Fix two build breaks in Android. First is UINT8 is undefined, replaced with <cstdint.h>'s uint8_t. Second is that the switch statement is not exhaustive, so I've added a default case with a warning in this case.
@@ -65,7 +65,7 @@ namespace ARIASDK_NS_BEGIN
break;
case CsProtocol::ValueKind::ValueBool:
{
- UINT8 temp = static_cast<UINT8>(mapIt->second.longValue);
+ uint8_t temp = static_cast<uint8_t>(mapIt->second.longValue);
object["data"][mapIt->first] = temp;
break;
}
@@ -111,7 +111,6 @@ namespace ARIASDK_NS_BEGIN
}
case CsProtocol::ValueKind::ValueGuid:
{
-
if (mapIt->second.guidValue.size() > 0)
{
/*GUID temp = GUID_t::convertUintVectorToGUID(mapIt->second.guidValue[0]);
@@ -119,6 +118,11 @@ namespace ARIASDK_NS_BEGIN
}
break;
}
+ default:
+ {
+ LOG_WARN("Unsupported type %d", static_cast<int32_t>(mapIt->second.type));
+ break;
+ }
}
}
}
