From 83acd5f17e67f6bbe586a061a4317815f176e196 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Tue, 2 Oct 2018 20:21:08 +0200 Subject: [PATCH] One less local variable in marshalls --- core/io/marshalls.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/io/marshalls.cpp b/core/io/marshalls.cpp index ec430d41a97..6338cee39d0 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;