Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonas Schmitt
waLBerla
Commits
1656f508
Commit
1656f508
authored
May 08, 2017
by
Sebastian Eibl
Browse files
Merge branch 'block-exception-fix' into 'master'
Replaces exception thrown on getBlock with NULL See merge request !12
parents
58a35558
9f82af91
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/domain_decomposition/BlockStorage.h
View file @
1656f508
...
...
@@ -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
;
}
//*******************************************************************************************************************
/*!
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment