Skip to content

Commit

Permalink
refs #6449 Minor changes to keep profiler happy
Browse files Browse the repository at this point in the history
and VS2012 compiler in release with debug info mode. It seems in this mode id is very picky (if not buggy)
  • Loading branch information
abuts committed Apr 5, 2013
1 parent a675803 commit 14f58bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/inc/MantidAPI/VectorParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ bool VectorParameter<Derived,ElemType>::operator!=(const Derived &other) const
template<typename Derived, typename ElemType>
VectorParameter<Derived,ElemType>::VectorParameter(const VectorParameter<Derived, ElemType> & other): m_size(other.m_size), m_isValid(other.m_isValid)
{
m_arry = new ElemType[other.m_size];
m_arry = new ElemType[other.getSize()];
for(size_t i = 0; i < other.getSize(); i++)
{
this->m_arry[i] = other.m_arry[i];
Expand Down
17 changes: 10 additions & 7 deletions Code/Mantid/Framework/MDEvents/test/MDBoxTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class MDBoxTest : public CxxTest::TestSuite
BoxController_sptr sc( new BoxController(3));
MDBox<MDLeanEvent<3>,3> b3(sc, 2);
TS_ASSERT_EQUALS( b3.getNumDims(), 3);
TS_ASSERT_EQUALS( b3.getBoxController(), sc);
TS_ASSERT( b3.getBoxController()==sc);
TS_ASSERT_EQUALS( b3.getNPoints(), 0);
TS_ASSERT_EQUALS( b3.getDepth(), 2);
TS_ASSERT_EQUALS( b3.getNumMDBoxes(), 1);
Expand All @@ -54,7 +54,7 @@ class MDBoxTest : public CxxTest::TestSuite
extents[0].setExtents(123,234);
MDBox<MDLeanEvent<1>,1> box(sc, 2, extents);
TS_ASSERT_EQUALS( box.getNumDims(), 1);
TS_ASSERT_EQUALS( box.getBoxController(), sc);
TS_ASSERT( box.getBoxController()==sc);
TS_ASSERT_EQUALS( box.getNPoints(), 0);
TS_ASSERT_EQUALS( box.getDepth(), 2);
TS_ASSERT_EQUALS( box.getNumMDBoxes(), 1);
Expand All @@ -79,7 +79,7 @@ class MDBoxTest : public CxxTest::TestSuite
// Compare
std::vector<MDLeanEvent<1> > events = box2.getEvents();
TS_ASSERT_EQUALS( box2.getNumDims(), 1);
TS_ASSERT_EQUALS( box2.getBoxController(), sc);
TS_ASSERT( box2.getBoxController()==sc);
TS_ASSERT_EQUALS( box2.getNPoints(), 15);
TS_ASSERT_EQUALS( events.size(), 15);
TS_ASSERT_DELTA( events[7].getCenter(0), 7.0, 1e-4);
Expand Down Expand Up @@ -308,7 +308,7 @@ class MDBoxTest : public CxxTest::TestSuite
for(size_t i=0; i < 12; i++) vec.push_back(ev);
b3.addEvents( vec );

TS_ASSERT_EQUALS( b3.getBoxController(), sc);
TS_ASSERT( b3.getBoxController()==sc);
}


Expand Down Expand Up @@ -524,7 +524,10 @@ class MDBoxTest : public CxxTest::TestSuite

// Start a NXS file
std::string filename = (ConfigService::Instance().getString("defaultsave.directory") + barefilename);
if (Poco::File(filename).exists()) Poco::File(filename).remove();
if (Poco::File(filename.c_str()).exists())
{
Poco::File(filename.c_str()).remove();
}
::NeXus::File * file = new ::NeXus::File(filename, NXACC_CREATE5);
file->makeGroup("my_test_group", "NXdata", 1);

Expand Down Expand Up @@ -593,8 +596,8 @@ class MDBoxTest : public CxxTest::TestSuite
void test_saveNexus()
{
std::string filename = do_saveNexus();
TS_ASSERT(Poco::File(filename).exists());
if (Poco::File(filename).exists()) Poco::File(filename).remove();
TS_ASSERT(Poco::File(filename.c_str()).exists());
if (Poco::File(filename.c_str()).exists()) Poco::File(filename).remove();
}

//-----------------------------------------------------------------------------------------
Expand Down

0 comments on commit 14f58bf

Please sign in to comment.