Added static cast to force correct type
This commit is contained in:
@ -474,8 +474,9 @@ asynStatus setAxisParam(A *axis, C *controller, const char *indexName,
|
|||||||
typename std::remove_pointer<decltype(ctrlPtr)>::type; \
|
typename std::remove_pointer<decltype(ctrlPtr)>::type; \
|
||||||
asynStatus setStatus = \
|
asynStatus setStatus = \
|
||||||
setAxisParam(axis, ctrlPtr, #indexSetterFunction, \
|
setAxisParam(axis, ctrlPtr, #indexSetterFunction, \
|
||||||
&ControllerType::indexSetterFunction, writeValue, \
|
static_cast<int (ControllerType::*)()>( \
|
||||||
__PRETTY_FUNCTION__, __LINE__); \
|
&ControllerType::indexSetterFunction), \
|
||||||
|
writeValue, __PRETTY_FUNCTION__, __LINE__); \
|
||||||
if (setStatus != asynSuccess) \
|
if (setStatus != asynSuccess) \
|
||||||
return setStatus; \
|
return setStatus; \
|
||||||
} while (0)
|
} while (0)
|
||||||
@ -540,8 +541,9 @@ asynStatus getAxisParam(A *axis, C *controller, const char *indexName,
|
|||||||
typename std::remove_pointer<decltype(ctrlPtr)>::type; \
|
typename std::remove_pointer<decltype(ctrlPtr)>::type; \
|
||||||
asynStatus getStatus = \
|
asynStatus getStatus = \
|
||||||
getAxisParam(axis, ctrlPtr, #indexGetterFunction, \
|
getAxisParam(axis, ctrlPtr, #indexGetterFunction, \
|
||||||
&ControllerType::indexGetterFunction, readValue, \
|
static_cast<int (ControllerType::*)()>( \
|
||||||
__PRETTY_FUNCTION__, __LINE__); \
|
&ControllerType::indexGetterFunction), \
|
||||||
|
readValue, __PRETTY_FUNCTION__, __LINE__); \
|
||||||
if (getStatus != asynSuccess) \
|
if (getStatus != asynSuccess) \
|
||||||
return getStatus; \
|
return getStatus; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
Reference in New Issue
Block a user