settings: remove default_space_mode

This commit is contained in:
Andrzej Rybczak
2016-11-19 15:52:47 +01:00
parent 180c2d26fc
commit c6f5933bf9
3 changed files with 6 additions and 10 deletions

View File

@@ -177,12 +177,13 @@ NC::Buffer buffer(const std::string &v)
return result;
}
/*
void deprecated(const char *option, double version_removal)
{
std::cerr << "WARNING: " << option
<< " is deprecated and will be removed in " << version_removal << "\n";
}
*/
}
@@ -190,11 +191,6 @@ bool Configuration::read(const std::vector<std::string> &config_paths, bool igno
{
option_parser p;
// deprecation warnings
p.add<void>("default_space_mode", nullptr, "", [](std::string) {
deprecated("default_space_mode", 0.8);
});
// keep the same order of variables as in configuration file
p.add("ncmpcpp_directory", &ncmpcpp_directory, "~/.ncmpcpp/", adjust_directory);
p.add("lyrics_directory", &lyrics_directory, "~/.lyrics/", adjust_directory);

View File

@@ -35,7 +35,7 @@
#include "utility/option_parser.h"
bool yes_no(std::string v)
bool yes_no(const std::string &v)
{
if (v == "yes")
return true;

View File

@@ -46,10 +46,10 @@
}
template <typename DestT>
DestT verbose_lexical_cast(std::string v)
DestT verbose_lexical_cast(const std::string &v)
{
try {
return boost::lexical_cast<DestT>(std::move(v));
return boost::lexical_cast<DestT>(v);
} catch (boost::bad_lexical_cast &) {
invalid_value(v);
}
@@ -73,7 +73,7 @@ std::vector<ValueT> list_of(const std::string &v)
return list_of<ValueT>(v, verbose_lexical_cast<ValueT>);
}
bool yes_no(std::string v);
bool yes_no(const std::string &v);
////////////////////////////////////////////////////////////////////////////////