settings: remove default_space_mode

master
Andrzej Rybczak 9 years ago
parent 180c2d26fc
commit c6f5933bf9
  1. 8
      src/settings.cpp
  2. 2
      src/utility/option_parser.cpp
  3. 6
      src/utility/option_parser.h

@ -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);

@ -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;

@ -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);
////////////////////////////////////////////////////////////////////////////////

Loading…
Cancel
Save