Commit 1902e750 authored by ESTERIE Pierre's avatar ESTERIE Pierre

Qualifying size calls

parent dbdb0964
......@@ -169,8 +169,8 @@ bool parse_parameter(Handle<ParamDesc>& handle,
(void) args, (void) handle, (void) current_arg;
data = true;
std::string flag = *(current_arg-1);
if(size(flag) > 4) {
if(flag.find(std::string("=off")) == size(flag)-4) {
if(detail::size(flag) > 4) {
if(flag.find(std::string("=off")) == detail::size(flag)-4) {
data = false;
}
}
......@@ -498,23 +498,23 @@ struct parameter_descripor_validator {
using std::begin;
using std::end;
if(size(handle.descriptor.flags) == 0
if(detail::size(handle.descriptor.flags) == 0
|| (std::find(begin(handle.descriptor.flags), end(handle.descriptor.flags), "")
!= end(handle.descriptor.flags)))
{
this->missing_flags.emplace_back(typeid(handle.descriptor).name());
}
flags.insert(begin(handle.descriptor.flags), end(handle.descriptor.flags));
flag_count += size(handle.descriptor.flags);
flag_count += detail::size(handle.descriptor.flags);
}
bool collective_result() const {
bool flag_conflict = (flag_count != size(flags));
bool flag_conflict = (flag_count != detail::size(flags));
if(flag_conflict) {
throw tcli::parameter_conflict("Some parameters share the same flags.");
}
bool all_named = size(this->missing_flags) == 0;
bool all_named = detail::size(this->missing_flags) == 0;
if(! all_named) {
std::stringstream sstr;
sstr << "Some parameters have no flag defined:";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment