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); });