common: remove redundant code

This commit is contained in:
Hermet Park 2024-09-05 23:40:32 +09:00
parent 6baeca91d8
commit ae4240f48e
2 changed files with 0 additions and 11 deletions

View file

@ -207,16 +207,6 @@ error:
return 0.0f;
}
int str2int(const char* str, size_t n)
{
int ret = 0;
for(size_t i = 0; i < n; ++i) {
ret = ret * 10 + (str[i] - '0');
}
return ret;
}
char* strDuplicate(const char *str, size_t n)
{
auto len = strlen(str);

View file

@ -29,7 +29,6 @@ namespace tvg
{
float strToFloat(const char *nPtr, char **endPtr); //convert to float
int str2int(const char* str, size_t n); //convert to integer
char* strDuplicate(const char *str, size_t n); //copy the string
char* strDirname(const char* path); //return the full directory name