Add SetValue for unsigned long for uint64_t

google::protobuf::uint64 is changing from unsigned long long to
uint64_t, which is sometimes unsigned long long and sometimes
unsigned long.  Add a SetValue specialization for unsigned long.
Mark both the unsigned long and unsigned long long specializations
as sometimes unused, they will be unused if uint64_t is the other.

Bug: 117607748
Test: m checkbuild
Change-Id: I8bec0be6cd7e13354cf96a7e510fe2b920aec561
This commit is contained in:
Colin Cross
2018-10-27 23:33:23 -07:00
parent 4540d4eba3
commit b0f80eb4a7

View File

@@ -48,6 +48,13 @@ void SetValue(const unsigned int& value,
attribute->int64Value = value;
}
template<>
__attribute__((unused))
void SetValue(const unsigned long& value,
DrmMetricGroup::Attribute* attribute) {
attribute->int64Value = value;
}
template<>
__attribute__((unused))
void SetValue(const unsigned long long& value,
DrmMetricGroup::Attribute* attribute) {
attribute->int64Value = value;