From 79da07b5fcc2a0100b1b9490e88ba7307c2ad2b8 Mon Sep 17 00:00:00 2001 From: Sebastian Eibl <sebastian.eibl@fau.de> Date: Tue, 30 Jan 2018 13:48:00 +0100 Subject: [PATCH] [BUGFIX] added missing & --- src/pe/rigidbody/BodyStorage.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pe/rigidbody/BodyStorage.h b/src/pe/rigidbody/BodyStorage.h index 6761fea4e..0ab0ef40b 100644 --- a/src/pe/rigidbody/BodyStorage.h +++ b/src/pe/rigidbody/BodyStorage.h @@ -133,12 +133,12 @@ public: //**Callbacks************************************************************************ /*!\name Callbacks */ //@{ - inline void registerAddCallback ( const std::string name, const std::function<void (BodyID)>& func ); - inline void deregisterAddCallback ( const std::string name ); + inline void registerAddCallback ( const std::string& name, const std::function<void (BodyID)>& func ); + inline void deregisterAddCallback ( const std::string& name ); inline void clearAddCallbacks ( ); - inline void registerRemoveCallback ( const std::string name, const std::function<void (BodyID)>& func ); - inline void deregisterRemoveCallback ( const std::string name ); + inline void registerRemoveCallback ( const std::string& name, const std::function<void (BodyID)>& func ); + inline void deregisterRemoveCallback ( const std::string& name ); inline void clearRemoveCallbacks ( ); //@} //********************************************************************************************** @@ -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!"); 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 ); if (res != addCallbacks_.end() ) @@ -733,13 +733,13 @@ inline void BodyStorage::clearAddCallbacks ( ) 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!"); 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 ); if (res != removeCallbacks_.end() ) -- GitLab