[gnome-commander] C++ rework
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] C++ rework
- Date: Mon, 12 May 2014 15:24:08 +0000 (UTC)
commit 60074cc9b86185552733624358c0bf7e4e44b8b1
Author: Uwe Scholz <uwescholz src gnome org>
Date: Sun May 11 20:37:36 2014 +0200
C++ rework
src/gnome-cmd-file-list.h | 4 ++--
src/gnome-cmd-file-selector.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.h b/src/gnome-cmd-file-list.h
index 19b3589..9aa5e78 100644
--- a/src/gnome-cmd-file-list.h
+++ b/src/gnome-cmd-file-list.h
@@ -141,7 +141,7 @@ struct GnomeCmdFileList
void restore_selection();
void select_row(gint row);
- GnomeCmdFile *get_file_at_row(gint row) { return (GnomeCmdFile *) gtk_clist_get_row_data
(*this, row); }
+ GnomeCmdFile *get_file_at_row(gint row) { return static_cast<GnomeCmdFile
*>(gtk_clist_get_row_data (*this, row)); }
gint get_row_from_file(GnomeCmdFile *f) { return gtk_clist_find_row_from_data (*this, f);
}
void focus_file(const gchar *focus_file, gboolean scroll_to_file=TRUE);
@@ -201,7 +201,7 @@ inline GnomeCmdFileList::~GnomeCmdFileList()
inline void GnomeCmdFileList::remove_files (GList *files)
{
for (; files; files = files->next)
- remove_file((GnomeCmdFile *) files->data);
+ remove_file(static_cast<GnomeCmdFile *>(files->data));
}
inline gboolean GnomeCmdFileList::has_file(const GnomeCmdFile *f)
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index 3cd4b26..b041205 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -115,7 +115,7 @@ struct GnomeCmdFileSelector
inline GnomeCmdFileList *GnomeCmdFileSelector::file_list(gint n) const
{
- return (GnomeCmdFileList *) gtk_bin_get_child (GTK_BIN (notebook->page(n)));
+ return reinterpret_cast<GnomeCmdFileList *>(gtk_bin_get_child (GTK_BIN (notebook->page(n))));
}
inline void GnomeCmdFileSelector::set_connection(GnomeCmdCon *con, GnomeCmdDir *start_dir)
@@ -137,7 +137,7 @@ GtkType gnome_cmd_file_selector_get_type ();
inline GtkWidget *gnome_cmd_file_selector_new ()
{
- GnomeCmdFileSelector *fs = (GnomeCmdFileSelector *) g_object_new (GNOME_CMD_TYPE_FILE_SELECTOR, NULL);
+ GnomeCmdFileSelector *fs = static_cast<GnomeCmdFileSelector *>(g_object_new
(GNOME_CMD_TYPE_FILE_SELECTOR, NULL));
return *fs;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]