[gtkmm] Use of static_cast<>.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Use of static_cast<>.
- Date: Sat, 6 May 2017 21:02:06 +0000 (UTC)
commit dae609665ce5e022246efc1ad80fe8d96b73f3c3
Author: Murray Cumming <murrayc murrayc com>
Date: Sat May 6 23:01:31 2017 +0200
Use of static_cast<>.
gtk/src/entry.ccg | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gtk/src/entry.ccg b/gtk/src/entry.ccg
index 8c2893a..0d2dc91 100644
--- a/gtk/src/entry.ccg
+++ b/gtk/src/entry.ccg
@@ -26,43 +26,43 @@ namespace Gtk
void Entry::set_icon_from_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, IconPosition icon_pos)
{
- gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), Glib::unwrap(pixbuf));
+ gtk_entry_set_icon_from_pixbuf(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), Glib::unwrap(pixbuf));
}
void Entry::set_icon_from_icon_name(const Glib::ustring& icon_name, IconPosition icon_pos)
{
- gtk_entry_set_icon_from_icon_name(gobj(), ((GtkEntryIconPosition)(icon_pos)), icon_name.c_str());
+ gtk_entry_set_icon_from_icon_name(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), icon_name.c_str());
}
void Entry::set_icon_from_gicon(const Glib::RefPtr<Gio::Icon>& icon, IconPosition icon_pos)
{
- gtk_entry_set_icon_from_gicon(gobj(), ((GtkEntryIconPosition)(icon_pos)),
const_cast<GIcon*>(Glib::unwrap<Gio::Icon>(icon)));
+ gtk_entry_set_icon_from_gicon(gobj(), static_cast<GtkEntryIconPosition>(icon_pos),
const_cast<GIcon*>(Glib::unwrap<Gio::Icon>(icon)));
}
void Entry::unset_icon(IconPosition icon_pos)
{
//We could use any one of these set_icon_from_* functions:
- gtk_entry_set_icon_from_pixbuf(gobj(), ((GtkEntryIconPosition)(icon_pos)), nullptr);
+ gtk_entry_set_icon_from_pixbuf(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), nullptr);
}
void Entry::set_icon_activatable(bool activatable, IconPosition icon_pos)
{
- gtk_entry_set_icon_activatable(gobj(), ((GtkEntryIconPosition)(icon_pos)), static_cast<int>(activatable));
+ gtk_entry_set_icon_activatable(gobj(), static_cast<GtkEntryIconPosition>(icon_pos),
static_cast<int>(activatable));
}
void Entry::set_icon_tooltip_text(const Glib::ustring& tooltip, IconPosition icon_pos)
{
- gtk_entry_set_icon_tooltip_text(gobj(), ((GtkEntryIconPosition)(icon_pos)), tooltip.c_str());
+ gtk_entry_set_icon_tooltip_text(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), tooltip.c_str());
}
void Entry::set_icon_tooltip_markup(const Glib::ustring& tooltip, IconPosition icon_pos)
{
- gtk_entry_set_icon_tooltip_markup(gobj(), ((GtkEntryIconPosition)(icon_pos)), tooltip.c_str());
+ gtk_entry_set_icon_tooltip_markup(gobj(), static_cast<GtkEntryIconPosition>(icon_pos), tooltip.c_str());
}
void Entry::set_icon_drag_source(const Glib::RefPtr<TargetList>& target_list, Gdk::DragAction actions,
IconPosition icon_pos)
{
- gtk_entry_set_icon_drag_source(gobj(), ((GtkEntryIconPosition)(icon_pos)),
const_cast<GtkTargetList*>(Glib::unwrap(target_list)), ((GdkDragAction)(actions)));
+ gtk_entry_set_icon_drag_source(gobj(), static_cast<GtkEntryIconPosition>(icon_pos),
const_cast<GtkTargetList*>(Glib::unwrap(target_list)), static_cast<GdkDragAction>(actions));
}
Gdk::Rectangle Entry::get_icon_area(IconPosition icon_pos) const
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]