Fix incorrect hidl_vec comments.
This type value initializes primitives these days, but these comments
were written when it didn't.
Fixes: 153745259
Test: n/A
Change-Id: I0970e8fb830e94f5ca26f70291d127e85b7dbd59
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 0a0beeb..1bb38e8 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -342,7 +342,6 @@
memset(mPad, 0, sizeof(mPad));
}
- // Note, does not initialize primitive types.
hidl_vec(size_t size) : hidl_vec() { resize(size); }
hidl_vec(const hidl_vec<T> &other) : hidl_vec() {
@@ -507,7 +506,7 @@
return mBuffer[index];
}
- // Does not initialize primitive types if new size > old size.
+ // Copies over old elements fitting in new size. Value initializes the rest.
void resize(size_t size) {
if (size > UINT32_MAX) {
details::logAlwaysFatal("hidl_vec can't hold more than 2^32 elements.");