From 2f8ae23d579fc3fa16398efe8ebaf057a0d4ceef Mon Sep 17 00:00:00 2001 From: smathis Date: Mon, 16 Jun 2025 16:15:24 +0200 Subject: [PATCH] Added static cast to force correct type --- src/sinqAxis.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sinqAxis.h b/src/sinqAxis.h index 889ce30..68f4cf3 100644 --- a/src/sinqAxis.h +++ b/src/sinqAxis.h @@ -474,8 +474,9 @@ asynStatus setAxisParam(A *axis, C *controller, const char *indexName, typename std::remove_pointer::type; \ asynStatus setStatus = \ setAxisParam(axis, ctrlPtr, #indexSetterFunction, \ - &ControllerType::indexSetterFunction, writeValue, \ - __PRETTY_FUNCTION__, __LINE__); \ + static_cast( \ + &ControllerType::indexSetterFunction), \ + writeValue, __PRETTY_FUNCTION__, __LINE__); \ if (setStatus != asynSuccess) \ return setStatus; \ } while (0) @@ -540,8 +541,9 @@ asynStatus getAxisParam(A *axis, C *controller, const char *indexName, typename std::remove_pointer::type; \ asynStatus getStatus = \ getAxisParam(axis, ctrlPtr, #indexGetterFunction, \ - &ControllerType::indexGetterFunction, readValue, \ - __PRETTY_FUNCTION__, __LINE__); \ + static_cast( \ + &ControllerType::indexGetterFunction), \ + readValue, __PRETTY_FUNCTION__, __LINE__); \ if (getStatus != asynSuccess) \ return getStatus; \ } while (0)