diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-10-02 20:21:08 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-10-07 12:56:07 +0200 |
commit | 83acd5f17e67f6bbe586a061a4317815f176e196 (patch) | |
tree | 1809de83c762f63153534af7c6a58c8e81d3084b | |
parent | cff89fc4e4f2ceb577b5f7a119d98cb22d41ea44 (diff) |
One less local variable in marshalls
-rw-r--r-- | core/io/marshalls.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index ec430d41a9..6338cee39d 100644 --- a/core/io/marshalls.cpp +++ b/core/io/marshalls.cpp @@ -850,17 +850,16 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo } break; case Variant::INT: { - int64_t val = p_variant; if (flags & ENCODE_FLAG_64) { //64 bits if (buf) { - encode_uint64(val, buf); + encode_uint64(p_variant.operator int64_t(), buf); } r_len += 8; } else { if (buf) { - encode_uint32(int32_t(val), buf); + encode_uint32(p_variant.operator int32_t(), buf); } r_len += 4; |