Skip to content

Commit

Permalink
refs #6449 Stupid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts authored and martyngigg committed Apr 10, 2013
1 parent 8e4f316 commit 8cd399a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Code/Mantid/Framework/Kernel/test/DiskBufferISaveableTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class DiskBufferISaveableTest : public CxxTest::TestSuite
std::vector<ISaveableTester*> data;
size_t num;
std::vector<ISaveableTester*> bigData;
size_t BIG_NUM;
long BIG_NUM;

void setUp()
{
Expand All @@ -105,7 +105,7 @@ class DiskBufferISaveableTest : public CxxTest::TestSuite
BIG_NUM = 1000;
bigData.clear();
bigData.reserve(BIG_NUM);
for (size_t i=0; i<BIG_NUM; i++)
for (long i=0; i<BIG_NUM; i++)
bigData.push_back( new ISaveableTester(i) );
}

Expand Down Expand Up @@ -347,7 +347,7 @@ class DiskBufferISaveableTest : public CxxTest::TestSuite
DiskBuffer dbuf(3);

PARALLEL_FOR_NO_WSP_CHECK()
for (int i=0; i<int(BIG_NUM); i++)
for (long i=0; i<int(BIG_NUM); i++)
{
dbuf.toWrite(bigData[i]);
}
Expand All @@ -356,32 +356,32 @@ class DiskBufferISaveableTest : public CxxTest::TestSuite

void test_addAndRemove()
{
size_t DATA_SIZE(500);
long DATA_SIZE(500);
std::vector<size_t> indexToRemove(DATA_SIZE);
std::vector<ISaveable *> objToAdd(DATA_SIZE);
size_t iStep=BIG_NUM/DATA_SIZE;
long iStep=BIG_NUM/DATA_SIZE;
if(iStep<1||DATA_SIZE>BIG_NUM)
{
TSM_ASSERT("Test has wrong setting",false);
return;
}
for(size_t i=0;i<DATA_SIZE;i++)
for(long i=0;i<DATA_SIZE;i++)
{
indexToRemove[i]=i*iStep;
objToAdd[i] = new ISaveableTester(BIG_NUM+i*iStep);
objToAdd[i] = new ISaveableTester(size_t(BIG_NUM+i*iStep));
}


DiskBuffer dbuf(BIG_NUM+DATA_SIZE);
DiskBuffer dbuf(size_t(BIG_NUM+DATA_SIZE));
Kernel::Timer clock;
for(size_t i=0;i<BIG_NUM;i++)
for(long i=0;i<BIG_NUM;i++)
{
dbuf.toWrite(bigData[i]);
}
std::cout<<"\nFinished DiskBuffer insertion performance test, inserted "<<BIG_NUM <<" objects on 1 thread in "<< clock.elapsed()<<" sec\n";


for(size_t i=0;i<DATA_SIZE;i++)
for(long i=0;i<DATA_SIZE;i++)
{
dbuf.objectDeleted(bigData[indexToRemove[i]]);
dbuf.toWrite(objToAdd[i]);
Expand Down

0 comments on commit 8cd399a

Please sign in to comment.