提交 dd21e8fa 编写于 作者: S Simon Fels

Make never change value static and const

上级 7530bf92
......@@ -25,8 +25,8 @@
namespace {
bool is_little_endian() {
std::uint32_t v = 1;
return (*reinterpret_cast<std::uint8_t*>(&v) == 1);
static const std::uint32_t v = 1;
return (*reinterpret_cast<const std::uint8_t*>(&v) == 1);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册