[gtkmm] gtk-demo/demowindow: Order #includes correctly
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] gtk-demo/demowindow: Order #includes correctly
- Date: Fri, 26 May 2017 16:31:02 +0000 (UTC)
commit 06b92a9badfe822148993db5165df66752fe7501
Author: Daniel Boles <dboles src gnome org>
Date: Fri May 26 16:47:06 2017 +0100
gtk-demo/demowindow: Order #includes correctly
in the spirit of
https://git.gnome.org/browse/gtk+/tree/docs/CODING-STYLE#n458
“Every file must include config.h first, then its own header, then other
GTK+ headers that it needs, then system and third-party headers that it
needs.”
For the “other GTK+ headers” part, I took the liberty of using the order
I normally follow, which is GLib headers followed by GIO ones followed
by GTK+ ones. I use this as it follows their order in the software stack
demos/gtk-demo/demowindow.cc | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/demos/gtk-demo/demowindow.cc b/demos/gtk-demo/demowindow.cc
index 39bf983..a76ad51 100644
--- a/demos/gtk-demo/demowindow.cc
+++ b/demos/gtk-demo/demowindow.cc
@@ -19,17 +19,20 @@
#include "config.h"
#endif
-#include <gtkmm/cellrenderertext.h>
-#include <gtkmm/treeviewcolumn.h>
+#include "demowindow.h"
+
+#include "demos.h"
+#include "textwidget.h"
+
#include <glibmm/bytes.h>
#include <glibmm/convert.h>
#include <giomm/resource.h>
-#include "demowindow.h"
-#include "textwidget.h"
-#include "demos.h"
-#include <iostream>
-#include <cstring>
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/treeviewcolumn.h>
+
#include <cstddef>
+#include <cstring>
+#include <iostream>
using std::isspace;
using std::strlen;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]