fix: suppress warning about sign-unsign comparison

The solution is not ideal, but it's okay at the line
This commit is contained in:
ToruNiina
2019-03-13 14:03:04 +09:00
parent 360e890cc0
commit 74ceceef73

View File

@@ -1058,7 +1058,7 @@ bool is_valid_forward_table_definition(const value& fwd,
{
// table keys always contains all the nodes from the root.
const auto& tks = tabkeys.unwrap().first;
if(std::distance(key_first, key_last) == tks.size() &&
if(std::size_t(std::distance(key_first, key_last)) == tks.size() &&
std::equal(tks.begin(), tks.end(), key_first))
{
// the keys are equivalent. it is not allowed.
@@ -1079,7 +1079,7 @@ bool is_valid_forward_table_definition(const value& fwd,
// a dotted key starts from the node representing a table in which the
// dotted key belongs to.
const auto& dks = dotkeys.unwrap().first;
if(std::distance(key_curr, key_last) == dks.size() &&
if(std::size_t(std::distance(key_curr, key_last)) == dks.size() &&
std::equal(dks.begin(), dks.end(), key_curr))
{
// the keys are equivalent. it is not allowed.