Fix MSVC error in toppush.cpp
authorDmitry Morozov <aracsmd@gmail.com>
Fri, 13 Aug 2021 15:47:49 +0000 (15:47 +0000)
committerAndrey Alekseenko <al42and@gmail.com>
Fri, 13 Aug 2021 15:47:49 +0000 (15:47 +0000)
src/gromacs/gmxpreprocess/toppush.cpp

index 087695001b58e036ee755d07fde2825b2f7e4116..ebce88d3839e029fbb1ec5d80de1c1465a17ed95 100644 (file)
@@ -1970,7 +1970,7 @@ void push_bond(Directive                         d,
     }
 
     // These are the atom indices for this interaction
-    gmx::ArrayRef<int> atomIndices(aa.begin(), aa.begin() + nral);
+    auto atomIndices = gmx::ArrayRef<const int>(aa).subArray(0, nral);
 
     // Look up the A-state atom types for this interaction
     std::vector<int> atomTypes(atomIndices.size());