Unverified Commit 2fb47a51 authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2444 from FrazerClews/frazer/prefixOperator

make non-primitave types pre increment instead of post increment
parents 7a02c59b c6577ea6
...@@ -65,7 +65,7 @@ CustomNonbondedForce::CustomNonbondedForce(const CustomNonbondedForce& rhs) { ...@@ -65,7 +65,7 @@ CustomNonbondedForce::CustomNonbondedForce(const CustomNonbondedForce& rhs) {
particles = rhs.particles; particles = rhs.particles;
exclusions = rhs.exclusions; exclusions = rhs.exclusions;
interactionGroups = rhs.interactionGroups; interactionGroups = rhs.interactionGroups;
for (vector<FunctionInfo>::const_iterator it = rhs.functions.begin(); it != rhs.functions.end(); it++) for (vector<FunctionInfo>::const_iterator it = rhs.functions.begin(); it != rhs.functions.end(); ++it)
functions.push_back(FunctionInfo(it->name, it->function->Copy())); functions.push_back(FunctionInfo(it->name, it->function->Copy()));
} }
......
...@@ -138,7 +138,7 @@ bool System::usesPeriodicBoundaryConditions() const { ...@@ -138,7 +138,7 @@ bool System::usesPeriodicBoundaryConditions() const {
bool uses_pbc = false; bool uses_pbc = false;
bool all_forces_implement = true; bool all_forces_implement = true;
for (std::vector<Force*>::const_iterator it = forces.begin(); for (std::vector<Force*>::const_iterator it = forces.begin();
it != forces.end(); it++) { it != forces.end(); ++it) {
try { try {
if ((*it)->usesPeriodicBoundaryConditions()) if ((*it)->usesPeriodicBoundaryConditions())
uses_pbc = true; uses_pbc = true;
......
...@@ -132,9 +132,9 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid(const TorsionTorsionGrid& grid, ...@@ -132,9 +132,9 @@ void AmoebaTorsionTorsionForceImpl::reorderGrid(const TorsionTorsionGrid& grid,
// increment map iterators // increment map iterators
mapJJ++; ++mapJJ;
if (mapJJ == map_Double_IntPair.end()) { if (mapJJ == map_Double_IntPair.end()) {
mapII++; ++mapII;
if (mapII == mapAngles.end()) { if (mapII == mapAngles.end()) {
if ((jj != (grid[ii].size()-1)) && (ii != (grid.size()-1))) { if ((jj != (grid[ii].size()-1)) && (ii != (grid.size()-1))) {
char buffer[1024]; char buffer[1024];
......
...@@ -128,7 +128,7 @@ void testSerialization() { ...@@ -128,7 +128,7 @@ void testSerialization() {
map<string, double>::const_iterator it1=p1.begin(); map<string, double>::const_iterator it1=p1.begin();
map<string, double>::const_iterator it2=p2.begin(); map<string, double>::const_iterator it2=p2.begin();
//maps are ordered, so iterators should be in the same order. //maps are ordered, so iterators should be in the same order.
for (it1 = p1.begin(); it1 != p1.end(); it1++, it2++) { for (it1 = p1.begin(); it1 != p1.end(); ++it1, ++it2) {
assert((it1->first).compare(it2->first) == 0); assert((it1->first).compare(it2->first) == 0);
ASSERT_EQUAL(it1->second, it2->second); ASSERT_EQUAL(it1->second, it2->second);
} }
......
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