REVIEWED: Some functions input parametes that should be const

This commit is contained in:
raysan5
2022-02-20 20:35:28 +01:00
parent 68bad6986d
commit 937e7b3dd9
6 changed files with 35 additions and 34 deletions

View File

@@ -1092,7 +1092,7 @@ void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSiz
}
// Draw multiple character (codepoints)
void DrawTextCodepoints(Font font, int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint)
void DrawTextCodepoints(Font font, const int *codepoints, int count, Vector2 position, float fontSize, float spacing, Color tint)
{
int textOffsetY = 0; // Offset between lines (on line break '\n')
float textOffsetX = 0.0f; // Offset X to next character to draw
@@ -1605,7 +1605,7 @@ const char *TextToPascal(const char *text)
// Encode text codepoint into UTF-8 text
// REQUIRES: memcpy()
// WARNING: Allocated memory should be manually freed
char *TextCodepointsToUTF8(int *codepoints, int length)
char *TextCodepointsToUTF8(const int *codepoints, int length)
{
// We allocate enough memory fo fit all possible codepoints
// NOTE: 5 bytes for every codepoint should be enough