[gnome-commander/Implement_CppCheck_suggestions] C++11 cast, use nullptr instead of NULL
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/Implement_CppCheck_suggestions] C++11 cast, use nullptr instead of NULL
- Date: Wed, 20 Mar 2019 22:34:27 +0000 (UTC)
commit 575e4179ffd3d0f54c62a12e6462c74214762a09
Author: Uwe Scholz <u scholz83 gmx de>
Date: Tue Mar 19 21:14:52 2019 +0100
C++11 cast, use nullptr instead of NULL
src/gnome-cmd-con-list.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-con-list.h b/src/gnome-cmd-con-list.h
index 943c71f2..fbcf5cbd 100644
--- a/src/gnome-cmd-con-list.h
+++ b/src/gnome-cmd-con-list.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file gnome-cmd-con-list.h
* @copyright (C) 2001-2006 Marcus Bjurman\n
* @copyright (C) 2007-2012 Piotr Eljasiak\n
@@ -58,7 +58,11 @@ struct GnomeCmdConList
void remove(GnomeCmdConDevice *con);
GnomeCmdCon *find_alias(const gchar *alias) const;
- gboolean has_alias(const gchar *alias) const { return find_alias(alias)!=NULL; }
+
+ gboolean has_alias(const gchar *alias) const
+ {
+ return find_alias(alias) != nullptr;
+ }
GnomeCmdCon *get_home();
GnomeCmdCon *get_smb();
@@ -78,12 +82,12 @@ struct GnomeCmdConListClass
inline GnomeCmdConList *gnome_cmd_con_list_new ()
{
- return (GnomeCmdConList *) g_object_new (GNOME_CMD_TYPE_CON_LIST, NULL);
+ return static_cast<GnomeCmdConList *>(g_object_new (GNOME_CMD_TYPE_CON_LIST, nullptr));
}
inline GnomeCmdConList *gnome_cmd_con_list_get ()
{
- return (GnomeCmdConList *) gnome_cmd_data_get_con_list ();
+ return static_cast<GnomeCmdConList *>(gnome_cmd_data_get_con_list ());
}
void gnome_cmd_con_list_add_quick_ftp (GnomeCmdConList *list, GnomeCmdConRemote *ftp_con);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]