summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-03-13 01:37:44 +0000
committerCarl Hetherington <cth@carlh.net>2016-03-13 01:37:44 +0000
commit1a1d4b22589d5832dd594a65054d9261f9f496cf (patch)
tree32e1ec37ad23fc68d13ab84654e3f98e54f92ebc /src/wx
parentea35bff04d7a96f44ea595951bb0c0dd54c8ee52 (diff)
Accept either , or . for a decimal separator in the gain calculator.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/gain_calculator_dialog.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/wx/gain_calculator_dialog.cc b/src/wx/gain_calculator_dialog.cc
index a840aebef..418ec2e77 100644
--- a/src/wx/gain_calculator_dialog.cc
+++ b/src/wx/gain_calculator_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,11 +17,9 @@
*/
-#include <boost/lexical_cast.hpp>
#include "gain_calculator_dialog.h"
#include "wx_util.h"
-
-using namespace boost;
+#include "lib/util.h"
GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent)
: TableDialog (parent, _("Gain Calculator"), 2, 1, true)
@@ -42,7 +40,7 @@ GainCalculatorDialog::wanted_fader () const
return 0;
}
- return lexical_cast<float> (wx_to_std (_wanted->GetValue ()));
+ return relaxed_string_to_float (wx_to_std (_wanted->GetValue ()));
}
float
@@ -52,5 +50,5 @@ GainCalculatorDialog::actual_fader () const
return 0;
}
- return lexical_cast<float> (wx_to_std (_actual->GetValue ()));
+ return relaxed_string_to_float (wx_to_std (_actual->GetValue ()));
}