Skip to content

Commit

Permalink
Refs #4472 simplification of adding two Run's together
Browse files Browse the repository at this point in the history
  • Loading branch information
Janik Zikovsky committed Mar 2, 2012
1 parent 954fb60 commit d17df8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Code/Mantid/Framework/API/src/Run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Kernel::Logger& Run::g_log = Kernel::Logger::get("Run");
if (rhs.m_manager.existsProperty(ADDABLE[i]))
{
// get a pointer to the property on the right-handside workspace
Property * right = rhs.m_manager.getProperty();
Property * right = rhs.m_manager.getProperty(ADDABLE[i]);

// now deal with the left-handside
if (m_manager.existsProperty(ADDABLE[i]))
Expand Down
13 changes: 4 additions & 9 deletions Code/Mantid/Framework/Kernel/src/PropertyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,10 @@ namespace Mantid
*/
bool PropertyManager::existsProperty( const std::string& name ) const
{
try
{
getPointerToProperty(name);
return true;
}
catch (Exception::NotFoundError&)
{
return false;
}
std::string ucName = name;
std::transform(ucName.begin(), ucName.end(), ucName.begin(), toupper);
auto it = m_properties.find(ucName);
return (it != m_properties.end());
}

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

0 comments on commit d17df8f

Please sign in to comment.