Fix a couple of conversion warnings in OptionParser for testing.

This commit is contained in:
Kenneth Moreland 2015-06-10 13:58:26 -06:00
parent 90835e7982
commit 6a2140fe57

@ -540,7 +540,7 @@ public:
*/ */
int index() const int index() const
{ {
return desc == 0 ? -1 : desc->index; return desc == 0 ? -1 : static_cast<int>(desc->index);
} }
/** /**
@ -1454,7 +1454,7 @@ public:
{ return false; } // overflow protection: don't accept number of options that doesn't fit signed int { return false; } // overflow protection: don't accept number of options that doesn't fit signed int
buffer[parser.op_count] = option; buffer[parser.op_count] = option;
int idx = buffer[parser.op_count].desc->index; unsigned int idx = buffer[parser.op_count].desc->index;
if (options[idx]) if (options[idx])
{ options[idx].append(buffer[parser.op_count]); } { options[idx].append(buffer[parser.op_count]); }
else else