summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-01 16:00:30 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-01 21:32:27 +0100
commit85fa5c482d005ea8b53d3dce54a8f15b237deb14 (patch)
tree891cc16831a0b5c84bc574ce253f0ff59a6cc08d /src
parent765f90586c498860aa687e2b0cd6cedf1e0b1bf0 (diff)
Explicit casts optional to bool.
Diffstat (limited to 'src')
-rw-r--r--src/wx/config_dialog.cc2
-rw-r--r--src/wx/content_colour_conversion_dialog.cc6
-rw-r--r--src/wx/screen_dialog.cc2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 5b02d71e3..dcafee4ca 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -227,7 +227,7 @@ private:
{
Config* config = Config::instance ();
- checked_set (_set_language, config->language ());
+ checked_set (_set_language, static_cast<bool>(config->language()));
if (config->language().get_value_or ("") == "fr") {
checked_set (_language, 3);
diff --git a/src/wx/content_colour_conversion_dialog.cc b/src/wx/content_colour_conversion_dialog.cc
index 9713cde1b..e4e16157d 100644
--- a/src/wx/content_colour_conversion_dialog.cc
+++ b/src/wx/content_colour_conversion_dialog.cc
@@ -93,8 +93,8 @@ ContentColourConversionDialog::check_for_preset ()
optional<size_t> preset = _editor->get().preset ();
- _preset_check->SetValue (preset);
- _preset_choice->Enable (preset);
+ _preset_check->SetValue (static_cast<bool>(preset));
+ _preset_choice->Enable (static_cast<bool>(preset));
if (preset) {
_preset_choice->SetSelection (preset.get ());
} else {
@@ -123,5 +123,3 @@ ContentColourConversionDialog::preset_choice_changed ()
set (presets[s].conversion);
}
}
-
-
diff --git a/src/wx/screen_dialog.cc b/src/wx/screen_dialog.cc
index 66e37a4cf..13dd9f42f 100644
--- a/src/wx/screen_dialog.cc
+++ b/src/wx/screen_dialog.cc
@@ -130,7 +130,7 @@ ScreenDialog::setup_sensitivity ()
{
wxButton* ok = dynamic_cast<wxButton*> (FindWindowById (wxID_OK, this));
if (ok) {
- ok->Enable (_certificate);
+ ok->Enable (static_cast<bool>(_certificate));
}
_download_certificate->Enable (