From 39e8dd2d10f7c28d912d31e30579e934dfd5706d Mon Sep 17 00:00:00 2001 From: roker Date: Mon, 14 Jun 2021 16:24:51 +0200 Subject: [PATCH] Yay, all tests are green now! \o/ --- test/unittest_stringpair.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/unittest_stringpair.cc b/test/unittest_stringpair.cc index 6a4e24b..fc565c9 100644 --- a/test/unittest_stringpair.cc +++ b/test/unittest_stringpair.cc @@ -47,7 +47,7 @@ TEST( StringPair, Dynamic ) spl.push_back( pEp::StringPair{key, value} ); } - auto find_by_key = [key](const ::stringpair_t* sp){ return strcmp(sp->key, key)==0; }; + auto find_by_key = [&key](const ::stringpair_t* sp){ return strcmp(sp->key, key)==0; }; // delete random elements. for(unsigned u=0; ukey, key); spl.erase(q); q = std::find_if( spl.begin(), spl.end(), find_by_key );