Commit f5120a2a authored by Kameiha's avatar Kameiha Committed by Wouter van Oortmerssen

more safer (#4186)

push_small(T little_endian_t) => push_small(const T& little_endian_t)
parent 037314a0
......@@ -565,7 +565,7 @@ class vector_downward {
}
// Specialized version of push() that avoids memcpy call for small data.
template<typename T> void push_small(T little_endian_t) {
template<typename T> void push_small(const T& little_endian_t) {
auto dest = make_space(sizeof(T));
*reinterpret_cast<T *>(dest) = little_endian_t;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment