Skip to content

Commit

Permalink
A few small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed May 6, 2024
1 parent b83d9c6 commit 4752993
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/tapkee/methods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ class DynamicImplementation : public ImplementationBase<RandomAccessIterator, Ke
throw unsupported_method_error("Features callback is missed");
}

const auto& self = static_cast<ImplementationBase<RandomAccessIterator, KernelCallback, DistanceCallback, FeaturesCallback>>(*this);

#define tapkee_method_handle(X) \
if (method.is(X)) { \
auto self = static_cast<ImplementationBase<RandomAccessIterator, KernelCallback, DistanceCallback, FeaturesCallback>>(*this); \
if (method == X) { \
auto implementation = \
X ## Implementation<RandomAccessIterator, KernelCallback, DistanceCallback, FeaturesCallback>(self); \
return implementation.embed(); \
Expand Down

0 comments on commit 4752993

Please sign in to comment.