mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14: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,
|
||||
const char* value)
|
||||
{
|
||||
INIReader* reader = (INIReader*)user;
|
||||
INIReader* reader = static_cast<INIReader*>(user);
|
||||
reader->_values[MakeKey(section, name)] = value;
|
||||
return 1;
|
||||
}
|
||||
|
@ -73,20 +73,20 @@ static char* rstrip(char* s)
|
||||
}
|
||||
|
||||
/* 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))
|
||||
s++;
|
||||
return (char*)s;
|
||||
return static_cast<char*>(s);
|
||||
}
|
||||
|
||||
/* Return pointer to first char c or ';' in given string, or pointer to
|
||||
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 != ';')
|
||||
s++;
|
||||
return (char*)s;
|
||||
return static_cast<char*>(s);
|
||||
}
|
||||
|
||||
/* Version of strncpy that ensures dest (size bytes) is null-terminated. */
|
||||
|
Loading…
Reference in New Issue
Block a user