[gtkmm] FileChooserDialog: Use static_cast, not C cast
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] FileChooserDialog: Use static_cast, not C cast
- Date: Mon, 27 Mar 2017 20:05:58 +0000 (UTC)
commit f57fa9f9668958a002fc9faaff1812fde54a9bfb
Author: Daniel Boles <dboles src gnome org>
Date: Mon Mar 27 18:10:28 2017 +0100
FileChooserDialog: Use static_cast, not C cast
static_cast is better C++ style and safer due to compile-time checking.
https://bugzilla.gnome.org/show_bug.cgi?id=780004
gtk/src/filechooserdialog.ccg | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/src/filechooserdialog.ccg b/gtk/src/filechooserdialog.ccg
index b4746ae..9ea6d86 100644
--- a/gtk/src/filechooserdialog.ccg
+++ b/gtk/src/filechooserdialog.ccg
@@ -24,14 +24,14 @@ namespace Gtk
FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction
action)
:
- _CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action)
+ _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
{
set_transient_for(parent);
}
FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
:
- _CONSTRUCT("title", title.c_str(), "action", (GtkFileChooserAction)action)
+ _CONSTRUCT("title", title.c_str(), "action", static_cast<GtkFileChooserAction>(action))
{
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]