[gnome-control-center/gbsneto/cleanup-network-panel] network: Use #pragma once on headers



commit d458e4fce8d105e56ce8ae175ff401d1a4238319
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Nov 1 00:19:21 2018 -0300

    network: Use #pragma once on headers
    
    Another low hanging fruit that reduces even more the
    number of lines of code of the headers.

 panels/network/cc-network-panel.h    | 6 +-----
 panels/network/cc-wifi-panel.h       | 6 +-----
 panels/network/net-device-ethernet.h | 6 +-----
 panels/network/net-device-mobile.h   | 6 +-----
 panels/network/net-device-simple.h   | 6 +-----
 panels/network/net-device-wifi.h     | 5 +----
 panels/network/net-device.h          | 6 +-----
 panels/network/net-proxy.h           | 6 +-----
 panels/network/net-vpn.h             | 6 +-----
 panels/network/network-dialogs.h     | 5 +----
 panels/network/panel-common.h        | 5 +----
 11 files changed, 11 insertions(+), 52 deletions(-)
---
diff --git a/panels/network/cc-network-panel.h b/panels/network/cc-network-panel.h
index bae9d7e2e..e4db954d3 100644
--- a/panels/network/cc-network-panel.h
+++ b/panels/network/cc-network-panel.h
@@ -17,9 +17,7 @@
  *
  */
 
-
-#ifndef _CC_NETWORK_PANEL_H
-#define _CC_NETWORK_PANEL_H
+#pragma once
 
 #include <shell/cc-panel.h>
 
@@ -32,5 +30,3 @@ G_DECLARE_FINAL_TYPE (CcNetworkPanel, cc_network_panel, CC, NETWORK_PANEL, CcPan
 GPtrArray *cc_network_panel_get_devices (CcNetworkPanel *panel);
 
 G_END_DECLS
-
-#endif /* _CC_NETWORK_PANEL_H */
diff --git a/panels/network/cc-wifi-panel.h b/panels/network/cc-wifi-panel.h
index 059507dc9..20b6e341b 100644
--- a/panels/network/cc-wifi-panel.h
+++ b/panels/network/cc-wifi-panel.h
@@ -17,8 +17,7 @@
  *
  */
 
-#ifndef CC_WIFI_PANEL_H
-#define CC_WIFI_PANEL_H
+#pragma once
 
 #include <shell/cc-panel.h>
 
@@ -31,6 +30,3 @@ G_DECLARE_FINAL_TYPE (CcWifiPanel, cc_wifi_panel, CC, WIFI_PANEL, CcPanel)
 void                 cc_wifi_panel_static_init_func              (void);
 
 G_END_DECLS
-
-#endif /* CC_WIFI_PANEL_H */
-
diff --git a/panels/network/net-device-ethernet.h b/panels/network/net-device-ethernet.h
index 85da5bf3b..d8b087fcc 100644
--- a/panels/network/net-device-ethernet.h
+++ b/panels/network/net-device-ethernet.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_DEVICE_ETHERNET_H
-#define __NET_DEVICE_ETHERNET_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -32,6 +31,3 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (NetDeviceEthernet, net_device_ethernet, NET, DEVICE_ETHERNET, NetDeviceSimple)
 
 G_END_DECLS
-
-#endif /* __NET_DEVICE_ETHERNET_H */
-
diff --git a/panels/network/net-device-mobile.h b/panels/network/net-device-mobile.h
index 8494af51b..2ab30deab 100644
--- a/panels/network/net-device-mobile.h
+++ b/panels/network/net-device-mobile.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_DEVICE_MOBILE_H
-#define __NET_DEVICE_MOBILE_H
+#pragma once
 
 #include <glib-object.h>
 #include <NetworkManager.h>
@@ -33,6 +32,3 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (NetDeviceMobile, net_device_mobile, NET, DEVICE_MOBILE, NetDevice)
 
 G_END_DECLS
-
-#endif /* __NET_DEVICE_MOBILE_H */
-
diff --git a/panels/network/net-device-simple.h b/panels/network/net-device-simple.h
index 738c0ddee..edd6dd271 100644
--- a/panels/network/net-device-simple.h
+++ b/panels/network/net-device-simple.h
@@ -20,8 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_DEVICE_SIMPLE_H
-#define __NET_DEVICE_SIMPLE_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -49,6 +48,3 @@ void  net_device_simple_set_show_separator     (NetDeviceSimple *device_simple,
                                                 gboolean         show_separator);
 
 G_END_DECLS
-
-#endif /* __NET_DEVICE_SIMPLE_H */
-
diff --git a/panels/network/net-device-wifi.h b/panels/network/net-device-wifi.h
index 9227d1c19..2bf78a0ec 100644
--- a/panels/network/net-device-wifi.h
+++ b/panels/network/net-device-wifi.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_DEVICE_WIFI_H
-#define __NET_DEVICE_WIFI_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -36,5 +35,3 @@ GtkWidget       *net_device_wifi_get_title_widget  (NetDeviceWifi *device_wifi);
 
 G_END_DECLS
 
-#endif /* __NET_DEVICE_WIFI_H */
-
diff --git a/panels/network/net-device.h b/panels/network/net-device.h
index a95419584..c265749b8 100644
--- a/panels/network/net-device.h
+++ b/panels/network/net-device.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_DEVICE_H
-#define __NET_DEVICE_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -47,6 +46,3 @@ NMConnection    *net_device_get_find_connection         (NetDevice      *device)
 GSList          *net_device_get_valid_connections       (NetDevice      *device);
 
 G_END_DECLS
-
-#endif /* __NET_DEVICE_H */
-
diff --git a/panels/network/net-proxy.h b/panels/network/net-proxy.h
index f647e7d75..dab0b37ca 100644
--- a/panels/network/net-proxy.h
+++ b/panels/network/net-proxy.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_PROXY_H
-#define __NET_PROXY_H
+#pragma once
 
 #include <glib-object.h>
 
@@ -34,6 +33,3 @@ G_DECLARE_FINAL_TYPE (NetProxy, net_proxy, NET, PROXY, NetObject)
 NetProxy        *net_proxy_new                          (void);
 
 G_END_DECLS
-
-#endif /* __NET_PROXY_H */
-
diff --git a/panels/network/net-vpn.h b/panels/network/net-vpn.h
index e12c377ca..049a4dcc7 100644
--- a/panels/network/net-vpn.h
+++ b/panels/network/net-vpn.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef __NET_VPN_H
-#define __NET_VPN_H
+#pragma once
 
 #include <glib-object.h>
 #include <NetworkManager.h>
@@ -36,6 +35,3 @@ void             net_vpn_set_show_separator     (NetVpn   *self,
                                                  gboolean  show_separator);
 
 G_END_DECLS
-
-#endif /* __NET_VPN_H */
-
diff --git a/panels/network/network-dialogs.h b/panels/network/network-dialogs.h
index 0f02a520a..54251c34d 100644
--- a/panels/network/network-dialogs.h
+++ b/panels/network/network-dialogs.h
@@ -17,8 +17,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef _NETWORK_DIALOGS_H
-#define _NETWORK_DIALOGS_H
+#pragma once
 
 #include <NetworkManager.h>
 #include <gtk/gtk.h>
@@ -37,5 +36,3 @@ void cc_network_panel_connect_to_8021x_network (GtkWidget        *toplevel,
 void cc_network_panel_connect_to_3g_network (GtkWidget        *toplevel,
                                              NMClient         *client,
                                              NMDevice         *device);
-
-#endif /* _NETWORK_DIALOGS_H */
diff --git a/panels/network/panel-common.h b/panels/network/panel-common.h
index 8a87748c1..9d9370424 100644
--- a/panels/network/panel-common.h
+++ b/panels/network/panel-common.h
@@ -19,8 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#ifndef PANEL_COMMON_H
-#define PANEL_COMMON_H
+#pragma once
 
 #include <glib-object.h>
 #include <NetworkManager.h>
@@ -51,5 +50,3 @@ gchar           *panel_get_ip4_dns_as_string                   (NMIPConfig *conf
 gchar           *panel_get_ip6_address_as_string               (NMIPConfig *config);
 
 G_END_DECLS
-
-#endif /* PANEL_COMMON_H */


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