提交 9b78cd11 编写于 作者: A arhag

using constexpr for lowest() #2461

上级 eadbb65b
......@@ -83,7 +83,7 @@ namespace eosio {
*
* @details Default constructor to fixed_key object which initializes all bytes to zero
*/
fixed_key() : _data() {}
constexpr fixed_key() : _data() {}
/**
* @brief Constructor to fixed_key object from std::array of num_words() words
......
......@@ -84,7 +84,7 @@ struct secondary_index_db_functions<TYPE> {\
#define MAKE_TRAITS_FOR_ARITHMETIC_SECONDARY_KEY(TYPE)\
template<>\
struct secondary_key_traits<TYPE> {\
static TYPE lowest() { return std::numeric_limits<TYPE>::lowest(); }\
static constexpr TYPE lowest() { return std::numeric_limits<TYPE>::lowest(); }\
};
namespace _multi_index_detail {
......@@ -109,7 +109,7 @@ namespace _multi_index_detail {
WRAP_SECONDARY_ARRAY_TYPE(idx256, key256)
template<>
struct secondary_key_traits<key256> {
static key256 lowest() { return key256(); }
static constexpr key256 lowest() { return key256(); }
};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册