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

Fixed error when multiple CustomCompoundBondForces are added to a system

parent 00c4b747
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* Biological Structures at Stanford, funded under the NIH Roadmap for * * Biological Structures at Stanford, funded under the NIH Roadmap for *
* Medical Research, grant U54 GM072970. See https://simtk.org. * * Medical Research, grant U54 GM072970. See https://simtk.org. *
* * * *
* Portions copyright (c) 2011 Stanford University and the Authors. * * Portions copyright (c) 2011-2012 Stanford University and the Authors. *
* Authors: Peter Eastman * * Authors: Peter Eastman *
* Contributors: * * Contributors: *
* * * *
...@@ -62,6 +62,9 @@ std::string OpenCLBondedUtilities::addArgument(cl::Memory& data, const string& t ...@@ -62,6 +62,9 @@ std::string OpenCLBondedUtilities::addArgument(cl::Memory& data, const string& t
} }
void OpenCLBondedUtilities::addPrefixCode(const string& source) { void OpenCLBondedUtilities::addPrefixCode(const string& source) {
for (int i = 0; i < (int) prefixCode.size(); i++)
if (prefixCode[i] == source)
return;
prefixCode.push_back(source); prefixCode.push_back(source);
} }
......
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