[gnome-commander/Implement_CppCheck_suggestions] C++11 cast



commit 78b5c77aa7e6a5440f0b6e2164a1771564c4122a
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Wed Mar 13 22:41:54 2019 +0100

    C++11 cast

 src/gnome-cmd-chmod-component.cc | 2 +-
 src/gnome-cmd-chown-component.cc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-chmod-component.cc b/src/gnome-cmd-chmod-component.cc
index 7f8506be..3da24212 100644
--- a/src/gnome-cmd-chmod-component.cc
+++ b/src/gnome-cmd-chmod-component.cc
@@ -171,7 +171,7 @@ static void init (GnomeCmdChmodComponent *comp)
 
 GtkWidget *gnome_cmd_chmod_component_new (GnomeVFSFilePermissions perms)
 {
-    GnomeCmdChmodComponent *comp = (GnomeCmdChmodComponent *) g_object_new (GNOME_CMD_TYPE_CHMOD_COMPONENT, 
NULL);
+    auto comp = static_cast <GnomeCmdChmodComponent*> (g_object_new (GNOME_CMD_TYPE_CHMOD_COMPONENT, 
nullptr));
 
     gnome_cmd_chmod_component_set_perms (comp, perms);
 
diff --git a/src/gnome-cmd-chown-component.cc b/src/gnome-cmd-chown-component.cc
index 92772d00..009cabd3 100644
--- a/src/gnome-cmd-chown-component.cc
+++ b/src/gnome-cmd-chown-component.cc
@@ -119,7 +119,7 @@ inline void load_users_and_groups (GnomeCmdChownComponent *comp)
 
 GtkWidget *gnome_cmd_chown_component_new ()
 {
-    GnomeCmdChownComponent *comp = (GnomeCmdChownComponent *) g_object_new (GNOME_CMD_TYPE_CHOWN_COMPONENT, 
NULL);
+    auto comp = static_cast<GnomeCmdChownComponent*> (g_object_new (GNOME_CMD_TYPE_CHOWN_COMPONENT, 
nullptr));
 
     load_users_and_groups (comp);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]