Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
071b6fa0
Commit
071b6fa0
authored
Nov 04, 2014
by
peastman
Browse files
Merge pull request #698 from rmcgibbo/range-check
range check getPlatform()
parents
2bf08a95
c1cbd441
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
olla/src/Platform.cpp
olla/src/Platform.cpp
+4
-1
No files found.
olla/src/Platform.cpp
View file @
071b6fa0
...
...
@@ -134,7 +134,10 @@ int Platform::getNumPlatforms() {
}
Platform
&
Platform
::
getPlatform
(
int
index
)
{
if
(
index
>=
0
&&
index
<
getNumPlatforms
())
{
return
*
getPlatforms
()[
index
];
}
throw
OpenMMException
(
"Invalid platform index"
);
}
Platform
&
Platform
::
getPlatformByName
(
const
string
&
name
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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