diff options
author | 2015-10-08 15:47:08 +0000 | |
---|---|---|
committer | 2015-10-08 15:47:08 +0000 | |
commit | 359f77c44dafef7ebed027180422ee75eef1467c (patch) | |
tree | b4b7fd4f8bf646dcd106351aaf2f5c1e6d719911 /runtime/utils.h | |
parent | 64d8d93aa9359b1126513dba92e27dbe184bfe3a (diff) | |
parent | ec7802a102d49ab5c17495118d4fe0bcc7287beb (diff) |
Merge "Add DCHECKs to ArenaVector and ScopedArenaVector."
Diffstat (limited to 'runtime/utils.h')
-rw-r--r-- | runtime/utils.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/utils.h b/runtime/utils.h index 3e618247d0..19cc462762 100644 --- a/runtime/utils.h +++ b/runtime/utils.h @@ -286,8 +286,9 @@ class VoidFunctor { } }; -template <typename Alloc> -void Push32(std::vector<uint8_t, Alloc>* buf, int32_t data) { +template <typename Vector> +void Push32(Vector* buf, int32_t data) { + static_assert(std::is_same<typename Vector::value_type, uint8_t>::value, "Invalid value type"); buf->push_back(data & 0xff); buf->push_back((data >> 8) & 0xff); buf->push_back((data >> 16) & 0xff); |