Closed jonathanperret closed 3 months ago
The recent updates involve the removal of overloaded sendMsg
functions across multiple classes, streamlining the interface to enforce const-correctness. The changes ensure that all sendMsg
methods only accept const char*
parameters, enhancing safety by preventing modifications to the message data. This simplifies the codebase and improves clarity while potentially boosting performance through reduced redundancy.
Files | Change Summary |
---|---|
src/ayab/com.cpp , src/ayab/com.h , src/ayab/global_com.cpp |
Removed overloaded sendMsg methods accepting char* , retaining only const char* versions to enforce const-correctness. |
test/mocks/com_mock.cpp , test/mocks/com_mock.h |
Updated sendMsg method declarations to accept const char* instead of char* , enhancing safety and immutability. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
A little bit of code cleanup: casting
char *
toconst char *
is a safe conversion that the compiler performs automatically.Summary by CodeRabbit
sendMsg
method across multiple classes to accept onlyconst char*
, enhancing safety and clarity in message handling.sendMsg
method.sendMsg
method, ensuring consistency in testing practices.