2019-12-27 02:38 AM
I wonder why are all ACI commands, that imply using pointer-to-const parameters actually use non-const ones? Is there any reason? Will it ever be fixed?
For example:
tBleStatus aci_gatt_add_service(uint8_t Service_UUID_Type,
Service_UUID_t *Service_UUID,
uint8_t Service_Type,
uint8_t Max_Attribute_Records,
uint16_t *Service_Handle)
{
<...>
Osal_MemCpy((void *) &cp0->Service_UUID, (const void *) Service_UUID, size);
<...>
}
Solved! Go to Solution.
2020-01-07 12:43 AM
A request has been done to improve the type of those pointers to const values.
No date when it will be done and released.
Meanwhile you can do the cast for your development.
2019-12-27 03:19 AM
I believe that using const in the parameters of a function call merely indicates that it is not altered by the function, i.e. a constant.
2019-12-27 03:24 AM
Surely it does.
But if there is no const qualifier I cannot pass const Service_UUID_t parameter. I need to either make parameter non-const at the declaration (which is bad), or use const_cast (which is even worse)
2020-01-07 12:43 AM
A request has been done to improve the type of those pointers to const values.
No date when it will be done and released.
Meanwhile you can do the cast for your development.