Safer handling of reading bools from the param lib
This commit is contained in:
@ -598,8 +598,12 @@ asynStatus getAxisParamImpl(A *axis, C *controller, const char *indexName,
|
|||||||
int (C::*func)(), bool *readValue,
|
int (C::*func)(), bool *readValue,
|
||||||
const char *callerFunctionName, int lineNumber,
|
const char *callerFunctionName, int lineNumber,
|
||||||
size_t msgSize, TypeTag<bool>) {
|
size_t msgSize, TypeTag<bool>) {
|
||||||
return getAxisParamImpl(axis, indexName, func, static_cast<*int>(readValue),
|
int readValueInt = 0;
|
||||||
callerFunctionName, lineNumber, msgSize);
|
asynStatus status =
|
||||||
|
getAxisParamImpl(axis, indexName, func, &readValueInt,
|
||||||
|
callerFunctionName, lineNumber, msgSize);
|
||||||
|
*readValue = readValueInt != 0;
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename A, typename C>
|
template <typename A, typename C>
|
||||||
|
Reference in New Issue
Block a user