From 94bfa5ea258aabaaaa709dbd59b7601c8bc1c030 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 14 Sep 2020 18:59:19 +0200 Subject: [PATCH] test: get around an issue of toolset v141 --- test/lib/registry_plugin/plugin.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/lib/registry_plugin/plugin.cpp b/test/lib/registry_plugin/plugin.cpp index c96623e75..3e556405c 100644 --- a/test/lib/registry_plugin/plugin.cpp +++ b/test/lib/registry_plugin/plugin.cpp @@ -21,12 +21,14 @@ CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) { context = static_cast(ctx->userdata); } else { // forces things to break - static_cast(ctx->userdata)->prepare(); + auto ®istry = *static_cast(ctx->userdata); + + registry.prepare(); - const auto view = static_cast(ctx->userdata)->view(); - static_cast(ctx->userdata)->insert(view.begin(), view.end(), velocity{1., 1.}); - - static_cast(ctx->userdata)->view().each([](auto &pos, auto &vel) { + const auto view = registry.view(); + registry.insert(view.begin(), view.end(), velocity{1., 1.}); + + registry.view().each([](position &pos, velocity &vel) { pos.x += static_cast(16 * vel.dx); pos.y += static_cast(16 * vel.dy); });