aboutsummaryrefslogtreecommitdiffstats
path: root/alc/alconfig.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-16 15:10:36 -0700
committerChris Robinson <[email protected]>2019-09-16 15:10:36 -0700
commit899a414591559633f2641a74325dffc5e54562c7 (patch)
tree5cd3b23181266634ff89fd3bc3ea68862bc0762c /alc/alconfig.cpp
parent6d93b2ba81958eb277da4361924e89bc7048da41 (diff)
Remove the last uses of the system's str[n]casecmp
Diffstat (limited to 'alc/alconfig.cpp')
-rw-r--r--alc/alconfig.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp
index 666c2c2d..b266fe5b 100644
--- a/alc/alconfig.cpp
+++ b/alc/alconfig.cpp
@@ -46,6 +46,7 @@
#include <algorithm>
#include "alcmain.h"
+#include "alstring.h"
#include "logging.h"
#include "strutils.h"
#include "compat.h"
@@ -169,7 +170,7 @@ void LoadConfigFromFile(std::istream &f)
*endsection = 0;
curSection.clear();
- if(strcasecmp(section, "general") != 0)
+ if(al::strcasecmp(section, "general") != 0)
{
do {
char *nextp = std::strchr(section, '%');
@@ -447,7 +448,7 @@ const char *GetConfigValue(const char *devName, const char *blockName, const cha
return def;
std::string key;
- if(blockName && strcasecmp(blockName, "general") != 0)
+ if(blockName && al::strcasecmp(blockName, "general") != 0)
{
key = blockName;
if(devName)
@@ -532,8 +533,8 @@ al::optional<bool> ConfigValueBool(const char *devName, const char *blockName, c
if(!val[0]) return al::nullopt;
return al::make_optional(
- strcasecmp(val, "true") == 0 || strcasecmp(val, "yes") == 0 ||
- strcasecmp(val, "on") == 0 || atoi(val) != 0);
+ al::strcasecmp(val, "true") == 0 || al::strcasecmp(val, "yes") == 0 ||
+ al::strcasecmp(val, "on") == 0 || atoi(val) != 0);
}
int GetConfigValueBool(const char *devName, const char *blockName, const char *keyName, int def)
@@ -541,6 +542,6 @@ int GetConfigValueBool(const char *devName, const char *blockName, const char *k
const char *val = GetConfigValue(devName, blockName, keyName, "");
if(!val[0]) return def != 0;
- return (strcasecmp(val, "true") == 0 || strcasecmp(val, "yes") == 0 ||
- strcasecmp(val, "on") == 0 || atoi(val) != 0);
+ return (al::strcasecmp(val, "true") == 0 || al::strcasecmp(val, "yes") == 0 ||
+ al::strcasecmp(val, "on") == 0 || atoi(val) != 0);
}