Commit bf3a4db6 authored by Peter Eastman's avatar Peter Eastman
Browse files

Changed a few method signatures to make them easier to wrap

parent fa2c4192
......@@ -134,14 +134,14 @@ public:
*
* @param name the name of the parameter to get
*/
double getParameter(std::string name);
double getParameter(const std::string& name);
/**
* Set the value of an adjustable parameter defined by a Force object in the System.
*
* @param name the name of the parameter to set
* @param value the value of the parameter
*/
void setParameter(std::string name, double value);
void setParameter(const std::string& name, double value);
/**
* When an OpenMMContext is created, it may cache information about the System being simulated
* and the Force objects contained in it. This means that, if the System or Forces are then
......
......@@ -43,7 +43,7 @@ namespace OpenMM {
class OpenMMException : public std::exception {
public:
OpenMMException(std::string message) : message(message) {
OpenMMException(const std::string& message) : message(message) {
}
~OpenMMException() throw() {
}
......
......@@ -108,11 +108,11 @@ void OpenMMContext::setVelocities(const vector<Vec3>& velocities) {
impl->getVelocities().loadFromArray(&velocities[0]);
}
double OpenMMContext::getParameter(string name) {
double OpenMMContext::getParameter(const string& name) {
return impl->getParameter(name);
}
void OpenMMContext::setParameter(string name, double value) {
void OpenMMContext::setParameter(const string& name, double value) {
impl->setParameter(name, value);
}
......
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