aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 22:32:39 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 22:49:01 +0200
commit7de96275dd6e3b6997e799413e4537561041e199 (patch)
tree4eab0c018168c14eb22f9e086917d16ef3f8f6a8 /src/Main.cxx
parente13d0bf65653550c4cfe3f879441139f5242d8b1 (diff)
downloadmpd-7de96275dd6e3b6997e799413e4537561041e199.tar.gz
mpd-7de96275dd6e3b6997e799413e4537561041e199.tar.xz
mpd-7de96275dd6e3b6997e799413e4537561041e199.zip
ConfigData: use std::string for config_param::value
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 8509abcfb..003f7414b 100644
--- a/src/Main.cxx
+++ b/src/Main.cxx
@@ -176,7 +176,8 @@ glue_db_init_and_load(void)
if (param == nullptr && path != nullptr) {
allocated = new config_param("database", path->line);
- allocated->AddBlockParam("path", path->value, path->line);
+ allocated->AddBlockParam("path", path->value.c_str(),
+ path->line);
param = allocated;
}
@@ -261,11 +262,11 @@ initialize_decoder_and_player(void)
param = config_get_param(CONF_AUDIO_BUFFER_SIZE);
if (param != nullptr) {
- long tmp = strtol(param->value, &test, 10);
+ long tmp = strtol(param->value.c_str(), &test, 10);
if (*test != '\0' || tmp <= 0 || tmp == LONG_MAX)
FormatFatalError("buffer size \"%s\" is not a "
"positive integer, line %i",
- param->value, param->line);
+ param->value.c_str(), param->line);
buffer_size = tmp;
} else
buffer_size = DEFAULT_BUFFER_SIZE;
@@ -280,12 +281,12 @@ initialize_decoder_and_player(void)
param = config_get_param(CONF_BUFFER_BEFORE_PLAY);
if (param != nullptr) {
- perc = strtod(param->value, &test);
+ perc = strtod(param->value.c_str(), &test);
if (*test != '%' || perc < 0 || perc > 100) {
FormatFatalError("buffered before play \"%s\" is not "
"a positive percentage and less "
"than 100 percent, line %i",
- param->value, param->line);
+ param->value.c_str(), param->line);
}
} else
perc = DEFAULT_BUFFER_BEFORE_PLAY;