From e9e937551eebdcb3161aa19515d8ed2f5ef7e936 Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Sat, 21 Oct 2017 00:55:17 +0300 Subject: [PATCH] #31 build fix --- easy_profiler_core/include/easy/arbitrary_value.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easy_profiler_core/include/easy/arbitrary_value.h b/easy_profiler_core/include/easy/arbitrary_value.h index 5012f4b..927d4a5 100644 --- a/easy_profiler_core/include/easy/arbitrary_value.h +++ b/easy_profiler_core/include/easy/arbitrary_value.h @@ -75,15 +75,15 @@ namespace profiler class ValueId EASY_FINAL { size_t m_id; - ValueId() = delete; public: - inline ValueId(const ValueId& _another) : m_id(_another.m_id) {} - explicit inline template ValueId(const T& _member) : m_id(static_cast(&_member)) {} + inline explicit ValueId() : m_id(0) {} + inline ValueId(const ValueId&) = default; + template ValueId(const T& _member) : m_id(reinterpret_cast(&_member)) {} inline size_t id() const { return m_id; } }; inline ValueId extract_value_id() { - return ValueId(0); + return ValueId(); } template @@ -99,7 +99,7 @@ namespace profiler template inline ValueId extract_value_id(TArgs...) { static_assert(sizeof...(TArgs) < 2, "No EasyBlockStatus in arguments list for EASY_BLOCK(name, ...)!"); - return ValueId(0); + return ValueId(); } enum DataType : uint8_t @@ -167,7 +167,7 @@ namespace profiler uint16_t size() const { return m_end16[0]; } DataType type() const { return static_cast(m_end8[2]); } - bool isArray() const { return static_cast(m_end8[3]); } + bool isArray() const { return m_end8[3] != 0; } ArbitraryValue(block_id_t _id, uint16_t _size, DataType _type, bool _isArray) : BaseBlockData(0, 0, _id) {