mirror of
https://github.com/openharmony/ark_runtime_core.git
synced 2026-07-18 10:18:07 -04:00
fix codex warnings(2022_02_15 runtime_core)
Signed-off-by: wangyantian <wangyantian@huawei.com>
This commit is contained in:
@@ -172,7 +172,7 @@ inline uint8_t GetByteFrom(T value, uint64_t index)
|
||||
inline uint16_t ReverseBytes(uint16_t value)
|
||||
{
|
||||
constexpr uint32_t OFFSET_0 = 8;
|
||||
return (value << OFFSET_0) | (value >> OFFSET_0); // NOLINT(hicpp-signed-bitwise)
|
||||
return static_cast<uint16_t>(value << OFFSET_0) | static_cast<uint16_t>(value >> OFFSET_0);
|
||||
}
|
||||
|
||||
inline uint32_t ReverseBytes(uint32_t value)
|
||||
|
||||
@@ -84,7 +84,7 @@ bool operator!=(const ValueUnit &lhs, const ValueUnit &rhs)
|
||||
std::ostream &operator<<(std::ostream &os, const ValueUnit &element)
|
||||
{
|
||||
if (element.GetValue().index() == 0U) {
|
||||
os << std::fixed << std::setprecision(element.GetPrecision()) << element.GetDoubleValue()
|
||||
os << std::fixed << std::setprecision(static_cast<int>(element.GetPrecision())) << element.GetDoubleValue()
|
||||
<< std::setprecision(-1);
|
||||
} else {
|
||||
os << element.GetUint64Value();
|
||||
|
||||
Reference in New Issue
Block a user