-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid some reinterpret_casts in CCData ops
Casting to/from data_t* (for non-char data_t) simplifies pointer arithmetic but requires reinterpret_casts and has potential to violate aliasing rules. This patch replaces such casts with manual calculations which allows for some reinterpret_casts to be converted to safer static_casts. We can also avoid reinterpret_cast when constructing keys because keys are now guaranteed to be stored as a sequence of bytes. Signed-off-by: Younes Manton <ymanton@ca.ibm.com>
- Loading branch information
Showing
3 changed files
with
32 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters