Default argument on plib::environment now optional. (nw)

This commit is contained in:
couriersud 2017-01-18 00:31:33 +01:00
parent 167d8405ec
commit d0b6742563
3 changed files with 3 additions and 3 deletions

View file

@ -775,7 +775,7 @@ void setup_t::resolve_inputs()
void setup_t::start_devices() void setup_t::start_devices()
{ {
pstring env = plib::util::environment("NL_LOGS"); pstring env = plib::util::environment("NL_LOGS", "");
if (env != "") if (env != "")
{ {

View file

@ -18,7 +18,7 @@ namespace plib
namespace util namespace util
{ {
const pstring buildpath(std::initializer_list<pstring> list ); const pstring buildpath(std::initializer_list<pstring> list );
const pstring environment(const pstring &var, const pstring &default_val = ""); const pstring environment(const pstring &var, const pstring &default_val);
} }
namespace container namespace container

View file

@ -275,7 +275,7 @@ void NETLIB_NAME(solver)::post_start()
//m_params.m_max_timestep = std::max(m_params.m_max_timestep, m_params.m_max_timestep::) //m_params.m_max_timestep = std::max(m_params.m_max_timestep, m_params.m_max_timestep::)
// Override log statistics // Override log statistics
pstring p = plib::util::environment("NL_STATS"); pstring p = plib::util::environment("NL_STATS", "");
if (p != "") if (p != "")
m_params.m_log_stats = p.as_long(); m_params.m_log_stats = p.as_long();
else else