Work around Clang Wstring-conversion warnings
(!"string") triggers the warning however (false && "string") does not. Fixes #75.
This commit is contained in:
parent
2cf599b310
commit
1bcf12402e
@ -300,7 +300,7 @@ PUGI__NS_BEGIN
|
|||||||
bucket = (bucket + probe + 1) & hashmod;
|
bucket = (bucket + probe + 1) & hashmod;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(!"Hash table is full");
|
assert(false && "Hash table is full");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +330,7 @@ PUGI__NS_BEGIN
|
|||||||
bucket = (bucket + probe + 1) & hashmod;
|
bucket = (bucket + probe + 1) & hashmod;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(!"Hash table is full");
|
assert(false && "Hash table is full");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2082,7 +2082,7 @@ PUGI__NS_BEGIN
|
|||||||
if (encoding == encoding_latin1)
|
if (encoding == encoding_latin1)
|
||||||
return convert_buffer_generic(out_buffer, out_length, contents, size, latin1_decoder());
|
return convert_buffer_generic(out_buffer, out_length, contents, size, latin1_decoder());
|
||||||
|
|
||||||
assert(!"Invalid encoding");
|
assert(false && "Invalid encoding");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -2187,7 +2187,7 @@ PUGI__NS_BEGIN
|
|||||||
if (encoding == encoding_latin1)
|
if (encoding == encoding_latin1)
|
||||||
return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable);
|
return convert_buffer_latin1(out_buffer, out_length, contents, size, is_mutable);
|
||||||
|
|
||||||
assert(!"Invalid encoding");
|
assert(false && "Invalid encoding");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -3556,7 +3556,7 @@ PUGI__NS_BEGIN
|
|||||||
if (encoding == encoding_latin1)
|
if (encoding == encoding_latin1)
|
||||||
return convert_buffer_output_generic(r_u8, data, length, wchar_decoder(), latin1_writer());
|
return convert_buffer_output_generic(r_u8, data, length, wchar_decoder(), latin1_writer());
|
||||||
|
|
||||||
assert(!"Invalid encoding");
|
assert(false && "Invalid encoding");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -3595,7 +3595,7 @@ PUGI__NS_BEGIN
|
|||||||
if (encoding == encoding_latin1)
|
if (encoding == encoding_latin1)
|
||||||
return convert_buffer_output_generic(r_u8, data, length, utf8_decoder(), latin1_writer());
|
return convert_buffer_output_generic(r_u8, data, length, utf8_decoder(), latin1_writer());
|
||||||
|
|
||||||
assert(!"Invalid encoding");
|
assert(false && "Invalid encoding");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -4085,7 +4085,7 @@ PUGI__NS_BEGIN
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Invalid node type");
|
assert(false && "Invalid node type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8427,7 +8427,7 @@ PUGI__NS_BEGIN
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Invalid variable type");
|
assert(false && "Invalid variable type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8448,7 +8448,7 @@ PUGI__NS_BEGIN
|
|||||||
return lhs->set(static_cast<const xpath_variable_boolean*>(rhs)->value);
|
return lhs->set(static_cast<const xpath_variable_boolean*>(rhs)->value);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Invalid variable type");
|
assert(false && "Invalid variable type");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8535,7 +8535,7 @@ PUGI__NS_BEGIN
|
|||||||
return *min_element(begin, end, document_order_comparator());
|
return *min_element(begin, end, document_order_comparator());
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Invalid node set type");
|
assert(false && "Invalid node set type");
|
||||||
return xpath_node();
|
return xpath_node();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9265,7 +9265,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(!"Wrong types");
|
assert(false && "Wrong types");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9340,7 +9340,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(!"Wrong types");
|
assert(false && "Wrong types");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9558,7 +9558,7 @@ PUGI__NS_BEGIN
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Unknown axis");
|
assert(false && "Unknown axis");
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@ -9753,7 +9753,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Unimplemented axis");
|
assert(false && "Unimplemented axis");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9834,7 +9834,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Unimplemented axis");
|
assert(false && "Unimplemented axis");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10076,7 +10076,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Wrong expression for return type boolean");
|
assert(false && "Wrong expression for return type boolean");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10212,7 +10212,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Wrong expression for return type number");
|
assert(false && "Wrong expression for return type number");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10495,7 +10495,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Wrong expression for return type string");
|
assert(false && "Wrong expression for return type string");
|
||||||
return xpath_string();
|
return xpath_string();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10586,7 +10586,7 @@ PUGI__NS_BEGIN
|
|||||||
return step_do(c, stack, eval, axis_to_type<axis_self>());
|
return step_do(c, stack, eval, axis_to_type<axis_self>());
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Unknown axis");
|
assert(false && "Unknown axis");
|
||||||
return xpath_node_set_raw();
|
return xpath_node_set_raw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10625,7 +10625,7 @@ PUGI__NS_BEGIN
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Wrong expression for return type node set");
|
assert(false && "Wrong expression for return type node set");
|
||||||
return xpath_node_set_raw();
|
return xpath_node_set_raw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -11912,7 +11912,7 @@ namespace pugi
|
|||||||
return static_cast<const impl::xpath_variable_boolean*>(this)->name;
|
return static_cast<const impl::xpath_variable_boolean*>(this)->name;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(!"Invalid variable type");
|
assert(false && "Invalid variable type");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user