From dd21e8fa1de0d8a200f63c4dc4e393eec5b5d725 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Thu, 11 May 2017 18:03:56 +0200 Subject: [PATCH] Make never change value static and const --- src/anbox/common/binary_writer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anbox/common/binary_writer.cpp b/src/anbox/common/binary_writer.cpp index f6d4973c..e9f16d92 100644 --- a/src/anbox/common/binary_writer.cpp +++ b/src/anbox/common/binary_writer.cpp @@ -25,8 +25,8 @@ namespace { bool is_little_endian() { - std::uint32_t v = 1; - return (*reinterpret_cast(&v) == 1); + static const std::uint32_t v = 1; + return (*reinterpret_cast(&v) == 1); } } -- GitLab