Dear CS10-Gitlab-users, on Thursday, Feb 3 there will be maintenance. That will lead to a downtime of the CS10-Gitlab-service including Subversion and Mattermost chat from 09:30. This might take the whole day since we don't know how long it is going to take. We are sorry for the inconvenience! Best regards, CS10-Admin-Team

Commit 9f82af91 authored by Felix Winterhalter's avatar Felix Winterhalter
Browse files

Change from .at to .find and NULL

parent 57476454
......@@ -276,7 +276,13 @@ public:
*/
//*******************************************************************************************************************
virtual const IBlock* getBlock( const IBlockID& id ) const = 0;
inline const IBlock* getBlock( const IBlockID::IDType& id) const { return iBlocks_.at(id); }
inline const IBlock* getBlock( const IBlockID::IDType& id) const {
auto it = iBlocks_.find(id);
if( it != iBlocks_.end()) return it->second;
return NULL;
}
//*******************************************************************************************************************
/*!
......@@ -291,7 +297,13 @@ public:
*/
//*******************************************************************************************************************
virtual IBlock* getBlock( const IBlockID& id ) = 0;
inline IBlock* getBlock( const IBlockID::IDType& id) { return iBlocks_.at(id); }
inline IBlock* getBlock( const IBlockID::IDType& id) {
auto it = iBlocks_.find(id);
if( it != iBlocks_.end()) return it->second;
return NULL;
}
//*******************************************************************************************************************
/*!
......
Markdown is supported
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