Ver código fonte

REVIEWED: `TextJoin()`, convert `const char **` to `char**`

It generates multiple issues: https://c-faq.com/ansi/constmismatch.html
pull/4683/head
Ray 6 dias atrás
pai
commit
e227371265
2 arquivos alterados com 2 adições e 2 exclusões
  1. +1
    -1
      src/raylib.h
  2. +1
    -1
      src/rtext.c

+ 1
- 1
src/raylib.h Ver arquivo

@ -1510,7 +1510,7 @@ RLAPI const char *TextFormat(const char *text, ...);
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
RLAPI char *TextReplace(const char *text, const char *replace, const char *by); // Replace text string (WARNING: memory must be freed!)
RLAPI char *TextInsert(const char *text, const char *insert, int position); // Insert text in a position (WARNING: memory must be freed!)
RLAPI char *TextJoin(">const char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI char *TextJoin(char **textList, int count, const char *delimiter); // Join text strings with delimiter
RLAPI char **TextSplit(const char *text, char delimiter, int *count); // Split text into multiple strings
RLAPI void TextAppend(char *text, const char *append, int *position); // Append text at specific position and move cursor!
RLAPI int TextFindIndex(const char *text, const char *find); // Find first text occurrence within a string

+ 1
- 1
src/rtext.c Ver arquivo

@ -1629,7 +1629,7 @@ char *TextInsert(const char *text, const char *insert, int position)
// Join text strings with delimiter
// REQUIRES: memset(), memcpy()
char *TextJoin(">const char **textList, int count, const char *delimiter)
char *TextJoin(char **textList, int count, const char *delimiter)
{
static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 };
memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH);

Carregando…
Cancelar
Salvar