Skip to content

Commit

Permalink
Refs #9247. Fixing unchecked return on iterator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Apr 1, 2014
1 parent c9d909c commit beabf6a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions Code/Mantid/Vates/VatesAPI/src/vtkMDLineFactory.cpp
Expand Up @@ -97,7 +97,8 @@ namespace Mantid
double progressFactor = 0.5/double(it->getDataSize());
double progressOffset = 0.5;

for(size_t iBox = 0; iBox < it->getDataSize(); ++iBox)
size_t iBox = 0;
do
{
progressUpdating.eventRaised(double(iBox)*progressFactor);

Expand Down Expand Up @@ -133,8 +134,8 @@ namespace Mantid
{
useBox[iBox] = false;
}
it->next();
}
++iBox;
} while (it->next());

delete[] masks;
for(size_t ii = 0; ii < it->getDataSize() ; ++ii)
Expand Down
7 changes: 4 additions & 3 deletions Code/Mantid/Vates/VatesAPI/src/vtkMDQuadFactory.cpp
Expand Up @@ -93,7 +93,8 @@ namespace Mantid
double progressFactor = 0.5/double(it->getDataSize());
double progressOffset = 0.5;

for(size_t iBox = 0; iBox < it->getDataSize(); ++iBox)
size_t iBox = 0;
do
{
progressUpdating.eventRaised(progressFactor * double(iBox));

Expand Down Expand Up @@ -129,8 +130,8 @@ namespace Mantid
{
useBox[iBox] = false;
}
it->next();
}
++iBox;
} while (it->next());

delete[] masks;
for(size_t ii = 0; ii < it->getDataSize() ; ++ii)
Expand Down

0 comments on commit beabf6a

Please sign in to comment.