diff --git a/opensfm/src/geometry/camera_instances.h b/opensfm/src/geometry/camera_instances.h index ba89e6407..7b0470831 100644 --- a/opensfm/src/geometry/camera_instances.h +++ b/opensfm/src/geometry/camera_instances.h @@ -195,38 +195,38 @@ using SphericalCamera = ProjectGeneric; /* This is where the pseudo-strategy pattern takes place. If you want to add * your own new camera model, just add a new enum value, the corresponding * case below and the implementation (see above). */ -template -void Dispatch(const ProjectionType& type, IN&&... args) { +template +void Dispatch(const ProjectionType& type, FUNC_IN&&... args) { switch (type) { case ProjectionType::PERSPECTIVE: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::BROWN: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::FISHEYE: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::FISHEYE_OPENCV: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::FISHEYE62: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::FISHEYE624: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::RADIAL: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::SIMPLE_RADIAL: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::DUAL: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::SPHERICAL: - FUNC::template Apply(std::forward(args)...); + FUNC::template Apply(std::forward(args)...); break; case ProjectionType::NONE: default: diff --git a/opensfm/src/geometry/functions.h b/opensfm/src/geometry/functions.h index 58c8e8db1..eafa82194 100644 --- a/opensfm/src/geometry/functions.h +++ b/opensfm/src/geometry/functions.h @@ -8,11 +8,11 @@ inline T SquaredNorm(T* point) { return point[0] * point[0] + point[1] * point[1]; } -template +template struct Functor { - constexpr static int InSize = IN; - constexpr static int ParamSize = P; - constexpr static int OutSize = OUT; + constexpr static int InSize = FUNC_IN; + constexpr static int ParamSize = FUNC_P; + constexpr static int OutSize = FUNC_OUT; template static constexpr int Stride() { return C * ParamSize + InSize;