Skip to content
Snippets Groups Projects
Commit 79da07b5 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

[BUGFIX] added missing &

parent f8b4520f
No related merge requests found
...@@ -133,12 +133,12 @@ public: ...@@ -133,12 +133,12 @@ public:
//**Callbacks************************************************************************ //**Callbacks************************************************************************
/*!\name Callbacks */ /*!\name Callbacks */
//@{ //@{
inline void registerAddCallback ( const std::string name, const std::function<void (BodyID)>& func ); inline void registerAddCallback ( const std::string& name, const std::function<void (BodyID)>& func );
inline void deregisterAddCallback ( const std::string name ); inline void deregisterAddCallback ( const std::string& name );
inline void clearAddCallbacks ( ); inline void clearAddCallbacks ( );
inline void registerRemoveCallback ( const std::string name, const std::function<void (BodyID)>& func ); inline void registerRemoveCallback ( const std::string& name, const std::function<void (BodyID)>& func );
inline void deregisterRemoveCallback ( const std::string name ); inline void deregisterRemoveCallback ( const std::string& name );
inline void clearRemoveCallbacks ( ); inline void clearRemoveCallbacks ( );
//@} //@}
//********************************************************************************************** //**********************************************************************************************
...@@ -713,13 +713,13 @@ inline void BodyStorage::clear() ...@@ -713,13 +713,13 @@ inline void BodyStorage::clear()
} }
//************************************************************************************************* //*************************************************************************************************
inline void BodyStorage::registerAddCallback ( const std::string name, const std::function<void (BodyID)>& func ) inline void BodyStorage::registerAddCallback ( const std::string& name, const std::function<void (BodyID)>& func )
{ {
WALBERLA_ASSERT_EQUAL(addCallbacks_.find(name), addCallbacks_.end(), "Callback '" << name << "' already exists!"); WALBERLA_ASSERT_EQUAL(addCallbacks_.find(name), addCallbacks_.end(), "Callback '" << name << "' already exists!");
addCallbacks_.insert( std::make_pair(name, func) ); addCallbacks_.insert( std::make_pair(name, func) );
} }
inline void BodyStorage::deregisterAddCallback ( const std::string name ) inline void BodyStorage::deregisterAddCallback ( const std::string& name )
{ {
auto res = addCallbacks_.find( name ); auto res = addCallbacks_.find( name );
if (res != addCallbacks_.end() ) if (res != addCallbacks_.end() )
...@@ -733,13 +733,13 @@ inline void BodyStorage::clearAddCallbacks ( ) ...@@ -733,13 +733,13 @@ inline void BodyStorage::clearAddCallbacks ( )
addCallbacks_.clear(); addCallbacks_.clear();
} }
inline void BodyStorage::registerRemoveCallback ( const std::string name, const std::function<void (BodyID)>& func ) inline void BodyStorage::registerRemoveCallback ( const std::string& name, const std::function<void (BodyID)>& func )
{ {
WALBERLA_ASSERT_EQUAL(removeCallbacks_.find(name), removeCallbacks_.end(), "Callback '" << name << "' already exists!"); WALBERLA_ASSERT_EQUAL(removeCallbacks_.find(name), removeCallbacks_.end(), "Callback '" << name << "' already exists!");
removeCallbacks_.insert( std::make_pair(name, func) ); removeCallbacks_.insert( std::make_pair(name, func) );
} }
inline void BodyStorage::deregisterRemoveCallback ( const std::string name ) inline void BodyStorage::deregisterRemoveCallback ( const std::string& name )
{ {
auto res = removeCallbacks_.find( name ); auto res = removeCallbacks_.find( name );
if (res != removeCallbacks_.end() ) if (res != removeCallbacks_.end() )
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment