diff options
Diffstat (limited to 'plugin/drumgizmo_plugin.cc')
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 5614014..6e4fe3c 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -538,6 +538,18 @@ int str2int(std::string a) } } +long long str2ll(std::string a) +{ + try + { + return std::stoll(a); + } + catch(...) + { + return 0; + } +} + } // end anonymous namespace DrumGizmoPlugin::ConfigStringIO::ConfigStringIO(Settings& settings) @@ -638,7 +650,7 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) if(p.value("disk_cache_upper_limit") != "") { - settings.disk_cache_upper_limit.store(str2int(p.value("disk_cache_upper_limit"))); + settings.disk_cache_upper_limit.store(str2ll(p.value("disk_cache_upper_limit"))); } if(p.value("disk_cache_chunk_size") != "") |