소스 검색

refactor: mutable lambda for index

Sam Jaffe 1 년 전
부모
커밋
3edfbe2a66
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      include/jvalidate/detail/simple_adapter.h

+ 1 - 2
include/jvalidate/detail/simple_adapter.h

@@ -189,8 +189,7 @@ public:
       }
 
       bool rval = true;
-      size_t index = 0;
-      rhs.apply_array([&, this](adapter::Adapter const & elem) {
+      rhs.apply_array([&, this, index = 0UL](adapter::Adapter const & elem) mutable {
         // Short-Circuit OK
         rval = rval && array[index].equals(elem, strict);
         ++index;