diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h index ad42816c7..5ca38d8be 100644 --- a/include/flatbuffers/flatbuffers.h +++ b/include/flatbuffers/flatbuffers.h @@ -565,7 +565,7 @@ class vector_downward { } // Specialized version of push() that avoids memcpy call for small data. - template void push_small(T little_endian_t) { + template void push_small(const T& little_endian_t) { auto dest = make_space(sizeof(T)); *reinterpret_cast(dest) = little_endian_t; }