- Llevem el const, dona algun problema
This commit is contained in:
@@ -426,7 +426,7 @@ namespace file
|
||||
|
||||
char tmp[255];
|
||||
|
||||
void ignoreWhitespace(const char **buffer, const bool stopOnLineEnd=false)
|
||||
void ignoreWhitespace(char **buffer, const bool stopOnLineEnd=false)
|
||||
{
|
||||
if (!stopOnLineEnd)
|
||||
while (**buffer!=0 && **buffer<=32) (*buffer)++;
|
||||
@@ -435,7 +435,7 @@ namespace file
|
||||
}
|
||||
|
||||
// Llig una cadena de l'arxiu especificat. En cas de no poder, torna nullptr.
|
||||
const char *readString(const char **buffer, const bool stopOnLineEnd)
|
||||
const char *readString(char **buffer, const bool stopOnLineEnd)
|
||||
{
|
||||
ignoreWhitespace(buffer, stopOnLineEnd);
|
||||
|
||||
@@ -450,13 +450,14 @@ namespace file
|
||||
int i=0;
|
||||
while (**buffer>32 && i<255)
|
||||
{
|
||||
tmp[i++] = *(*buffer++);
|
||||
tmp[i++] = *(*buffer)++;
|
||||
}
|
||||
tmp[i]=0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
// Llig un enter de l'arxiu especificat. En cas de no poder, torna 0.
|
||||
int readInt(const char **buffer)
|
||||
int readInt(char **buffer)
|
||||
{
|
||||
ignoreWhitespace(buffer);
|
||||
if (**buffer==0) return 0;
|
||||
|
||||
Reference in New Issue
Block a user