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
c1cbd441
Commit
c1cbd441
authored
Nov 03, 2014
by
Robert McGibbon
Browse files
range check getPlatform()
parent
2bf08a95
Changes
1
Hide 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 @
c1cbd441
...
...
@@ -134,7 +134,10 @@ int Platform::getNumPlatforms() {
}
Platform
&
Platform
::
getPlatform
(
int
index
)
{
return
*
getPlatforms
()[
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