typedef struct
{
float font_size;
int first_unicode_codepoint_in_range; // if non-zero, then the chars are continuous, and this is the first codepoint
int *array_of_unicode_codepoints; // if non-zero, then this is an array of unicode codepoints
int num_chars;
stbtt_packedchar *chardata_for_range; // output
unsigned char h_oversample, v_oversample; // don't set these, they're used internally
} stbtt_pack_range;
I think array_of_unicode_codepoints should be const int * because it's an input-only array.
Yeah, I guess so. Generally using const is a stylistic choice and I don't write const-safe code. But the API is supposed to be const-safe, and I guess this is part of the API.
In the library there is this struct:
I think
array_of_unicode_codepoints
should beconst int *
because it's an input-only array.