Merge pull request #37 from JustCameToHelp/master

Corrected reporting of array indices violating uniqueItems constraint
This commit is contained in:
Tristan Penman 2017-02-11 17:48:17 +11:00 committed by GitHub
commit 5b170441d3

View File

@ -1052,8 +1052,9 @@ public:
bool validated = true;
const typename AdapterType::Array::const_iterator secondLast = --targetArray.end();
unsigned int outerIndex = 0;
for (typename AdapterType::Array::const_iterator outerItr = targetArray.begin(); outerItr != secondLast; ++outerItr) {
unsigned int innerIndex = 1;
typename AdapterType::Array::const_iterator outerItr = targetArray.begin();
for (; outerItr != secondLast; ++outerItr) {
unsigned int innerIndex = outerIndex + 1;
typename AdapterType::Array::const_iterator innerItr(outerItr);
for (++innerItr; innerItr != end; ++innerItr) {
if (outerItr->equalTo(*innerItr, true)) {