Change ArrayRef to use a proper iterator
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / ter_db.cpp
index 55ba2e241feef8be35ef4b80bb4691f4f551d131..bdf1f3db8e57f7fc20713895356e9faa4eb896a9 100644 (file)
@@ -425,7 +425,7 @@ std::vector<MoleculePatchDatabase*> filter_ter(gmx::ArrayRef<MoleculePatchDataba
             if (gmx::equalCaseInsensitive(resname, s, 3))
             {
                 found = true;
-                list.push_back(it);
+                list.push_back(&*it);
             }
             else
             {
@@ -478,14 +478,14 @@ std::vector<MoleculePatchDatabase*> filter_ter(gmx::ArrayRef<MoleculePatchDataba
                 });
                 if (found == list.end())
                 {
-                    list.push_back(it);
+                    list.push_back(&*it);
                 }
             }
         }
     }
     if (none_idx != tb.end())
     {
-        list.push_back(none_idx);
+        list.push_back(&*none_idx);
     }
 
     return list;