Skip to content

Commit 15ba3b2

Browse files
author
Franco Fusco
committed
Removed lambdas in chain.cpp
1 parent 5312490 commit 15ba3b2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

orocos_kdl/src/chain.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2121

2222
#include "chain.hpp"
23-
#include <algorithm>
23+
// #include <algorithm>
2424

2525
namespace KDL {
2626
using namespace std;
@@ -82,10 +82,10 @@ namespace KDL {
8282
if(nr >= nrOfSegments)
8383
return 0;
8484
// decrease the number of joints (once for each moving joint that is removed)
85-
nrOfJoints -= std::count_if(
86-
segments.begin()+nr, segments.end(),
87-
[](const Segment& seg) { return seg.getJoint().getType() != Joint::None; }
88-
);
85+
for(unsigned int i=nr; i<segments.size(); i++) {
86+
if(segments[i].getJoint().getType() != Joint::None)
87+
nrOfJoints--;
88+
}
8989
// number of segments to be deleted
9090
unsigned int to_del = nrOfSegments - nr;
9191
// reset the number of segments

0 commit comments

Comments
 (0)