mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-30 19:04:51 +00:00
Replace some C-style cast by static_cast<>()
This commit is contained in:
parent
a8c5ca81fd
commit
fe17181af3
@ -94,7 +94,7 @@ std::string INIReader::MakeKey(std::string section, std::string name)
|
|||||||
int INIReader::ValueHandler(void* user, const char* section, const char* name,
|
int INIReader::ValueHandler(void* user, const char* section, const char* name,
|
||||||
const char* value)
|
const char* value)
|
||||||
{
|
{
|
||||||
INIReader* reader = (INIReader*)user;
|
INIReader* reader = static_cast<INIReader*>(user);
|
||||||
reader->_values[MakeKey(section, name)] = value;
|
reader->_values[MakeKey(section, name)] = value;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -73,20 +73,20 @@ static char* rstrip(char* s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return pointer to first non-whitespace char in given string. */
|
/* Return pointer to first non-whitespace char in given string. */
|
||||||
static char* lskip(const char* s)
|
static char* lskip(char* s)
|
||||||
{
|
{
|
||||||
while (*s && isspace(*s))
|
while (*s && isspace(*s))
|
||||||
s++;
|
s++;
|
||||||
return (char*)s;
|
return static_cast<char*>(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return pointer to first char c or ';' in given string, or pointer to
|
/* Return pointer to first char c or ';' in given string, or pointer to
|
||||||
null at end of string if neither found. */
|
null at end of string if neither found. */
|
||||||
static char* find_char_or_comment(const char* s, char c)
|
static char* find_char_or_comment(char* s, char c)
|
||||||
{
|
{
|
||||||
while (*s && *s != c && *s != ';')
|
while (*s && *s != c && *s != ';')
|
||||||
s++;
|
s++;
|
||||||
return (char*)s;
|
return static_cast<char*>(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Version of strncpy that ensures dest (size bytes) is null-terminated. */
|
/* Version of strncpy that ensures dest (size bytes) is null-terminated. */
|
||||||
|
Loading…
Reference in New Issue
Block a user