Skip to content

Commit

Permalink
SBCodepointSequence: Mark buffer as const
Browse files Browse the repository at this point in the history
The functions never modify the buffer.
Marking it as const avoids the need for `const_cast` in C++.
  • Loading branch information
glebm committed Feb 5, 2025
1 parent 267749e commit cd73a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Headers/SBCodepointSequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef SBUInt32 SBStringEncoding;

typedef struct _SBCodepointSequence {
SBStringEncoding stringEncoding; /**< The encoding of the string. */
void *stringBuffer; /**< The source string containing the code units. */
const void *stringBuffer; /**< The source string containing the code units. */
SBUInteger stringLength; /**< The length of the string in terms of code units. */
} SBCodepointSequence;

Expand Down

0 comments on commit cd73a48

Please sign in to comment.