瀏覽代碼

test: suppress a wrong warning by clang

Michele Caini 2 年之前
父節點
當前提交
4f1e0805db
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      test/lib/registry/plugin/plugin.cpp

+ 2 - 2
test/lib/registry/plugin/plugin.cpp

@@ -17,8 +17,8 @@ CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) {
         const auto view = registry.view<test::boxed_int>();
         registry.insert(view.begin(), view.end(), test::empty{});
 
-        registry.view<test::boxed_int, test::empty>().each([count](test::boxed_int &elem) {
-            elem.value += count;
+        registry.view<test::boxed_int, test::empty>().each([cnt = count](test::boxed_int &elem) {
+            elem.value += cnt;
         });
     } break;
     case CR_CLOSE: