[gnome-system-monitor] Big includes cleanup



commit 9cad29d330ae4cd9ee66aaad2ffc05ca6fe6c0c1
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Sat Aug 10 17:35:04 2013 +0200

    Big includes cleanup

 src/argv.cpp           |    1 -
 src/cgroups.cpp        |    6 ++++--
 src/cgroups.h          |    7 ++-----
 src/load-graph.cpp     |   13 -------------
 src/lsof.cpp           |    3 ---
 src/main.cpp           |    4 ----
 src/smooth_refresh.cpp |    6 +-----
 src/util.cpp           |    4 ----
 src/util.h             |    4 ----
 9 files changed, 7 insertions(+), 41 deletions(-)
---
diff --git a/src/argv.cpp b/src/argv.cpp
index 489bb32..0b36965 100644
--- a/src/argv.cpp
+++ b/src/argv.cpp
@@ -4,7 +4,6 @@
 #include <glib/gi18n.h>
 #include <glibmm/optionentry.h>
 
-
 #include "argv.h"
 
 namespace procman
diff --git a/src/cgroups.cpp b/src/cgroups.cpp
index 62f220e..603e95f 100644
--- a/src/cgroups.cpp
+++ b/src/cgroups.cpp
@@ -3,7 +3,9 @@
 
 #include <glib.h>
 #include <glib/gi18n.h>
+#include <cstring>
 
+#include "cgroups.h"
 #include "application.h"
 #include "util.h"
 
@@ -21,7 +23,7 @@ cgroups_enabled(void)
     return has_cgroups;
 }
 
-void
+static void
 append_cgroup_name(char *line, gchar **current_cgroup_name)
 {
     gchar *controller, *path, *tmp, *path_plus_space;
@@ -69,7 +71,7 @@ append_cgroup_name(char *line, gchar **current_cgroup_name)
     *current_cgroup_name = tmp;
 }
 
-int
+static int
 check_cgroup_changed(gchar *line, gchar *current_cgroup_set)
 {
     /* check if line is contained in current_cgroup_set */
diff --git a/src/cgroups.h b/src/cgroups.h
index 0c2d9f9..ec0f4d7 100644
--- a/src/cgroups.h
+++ b/src/cgroups.h
@@ -6,10 +6,7 @@
 
 #include "application.h"
 
-void
-get_process_cgroup_info (ProcInfo *info);
-
-gboolean
-cgroups_enabled (void);
+void get_process_cgroup_info (ProcInfo *info);
+gboolean cgroups_enabled (void);
 
 #endif /* _GSM_CGROUPS_H_ */
diff --git a/src/load-graph.cpp b/src/load-graph.cpp
index 8d32e77..ce75d81 100644
--- a/src/load-graph.cpp
+++ b/src/load-graph.cpp
@@ -1,16 +1,6 @@
 /* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 #include <config.h>
 
-#include <gdkmm/pixbuf.h>
-
-#include <stdio.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <signal.h>
-#include <dirent.h>
-#include <string.h>
-#include <time.h>
-
 #include <glib/gi18n.h>
 
 #include <glibtop.h>
@@ -19,9 +9,6 @@
 #include <glibtop/swap.h>
 #include <glibtop/netload.h>
 #include <glibtop/netlist.h>
-#include <math.h>
-
-#include <algorithm>
 
 #include "application.h"
 #include "load-graph.h"
diff --git a/src/lsof.cpp b/src/lsof.cpp
index e112f13..e0de9cb 100644
--- a/src/lsof.cpp
+++ b/src/lsof.cpp
@@ -7,9 +7,6 @@
 
 #include <sys/wait.h>
 
-// #include <libsexy/sexy-icon-entry.h>
-
-
 #include <set>
 #include <string>
 #include <sstream>
diff --git a/src/main.cpp b/src/main.cpp
index ca242b9..5024ffd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,11 +20,7 @@
 
 #include <config.h>
 
-#include <stdlib.h>
-
 #include <locale.h>
-
-#include <gtkmm.h>
 #include <glib/gi18n.h>
 
 #include "application.h"
diff --git a/src/smooth_refresh.cpp b/src/smooth_refresh.cpp
index 38737d1..5c0d9fc 100644
--- a/src/smooth_refresh.cpp
+++ b/src/smooth_refresh.cpp
@@ -1,16 +1,12 @@
 /* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 #include <config.h>
 
-#include <sys/types.h>
-#include <unistd.h>
-
 #include <glib.h>
+
 #include <glibtop.h>
 #include <glibtop/proctime.h>
 #include <glibtop/cpu.h>
 
-#include <algorithm>
-
 #include "smooth_refresh.h"
 #include "application.h"
 #include "settings-keys.h"
diff --git a/src/util.cpp b/src/util.cpp
index 71d9e78..97e4548 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7,10 +7,6 @@
 
 #include <glibtop/proctime.h>
 #include <glibtop/procstate.h>
-#include <unistd.h>
-
-#include <stddef.h>
-#include <cstring>
 
 #include "util.h"
 #include "application.h"
diff --git a/src/util.h b/src/util.h
index 28fdc62..d97aaca 100644
--- a/src/util.h
+++ b/src/util.h
@@ -4,11 +4,7 @@
 
 #include <glib.h>
 #include <gtk/gtk.h>
-#include <stddef.h>
-#include <cstring>
 #include <string>
-#include <functional>
-#include <algorithm>
 
 using std::string;
 


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