summaryrefslogtreecommitdiff
path: root/modules/cairo-linear-gradient.cpp
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2019-05-31 23:40:53 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2019-06-08 23:11:29 -0700
commit01920362be26a2cb4e38b55cc211351391885d1d (patch)
treee82cc9c7af565610eb756ea5a561dbd83359d9a0 /modules/cairo-linear-gradient.cpp
parente9d108c4a67a45bc2caf5429736f164956f6c9dc (diff)
downloadgjs-01920362be26a2cb4e38b55cc211351391885d1d.tar.gz
maint: Fix header includes once and for all
Previously #include statements were a bit of a mess across the codebase. This commit is the result of a pass by the IWYU (Include What You Use) tool, which suggests headers to add or remove based on what is in the file, and can also suggest forward-declaring classes instead of including their headers, if they are only used as a pointer in a particular file. Cleaning this up should in general speed up compile times. IWYU isn't perfect, it produces a number of false positives, so we don't try to automate this process and we don't accept all of its recommendations. We do add a script and configuration file to the tools/ directory so that IWYU can be every so often in the future. We also clean up all the includes according to a consistent style, which is now described clearly in the C++ style guide.
Diffstat (limited to 'modules/cairo-linear-gradient.cpp')
-rw-r--r--modules/cairo-linear-gradient.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/cairo-linear-gradient.cpp b/modules/cairo-linear-gradient.cpp
index 7892a1c4..2fca7e3f 100644
--- a/modules/cairo-linear-gradient.cpp
+++ b/modules/cairo-linear-gradient.cpp
@@ -20,13 +20,16 @@
* IN THE SOFTWARE.
*/
-#include <config.h>
+#include <cairo.h>
+#include <glib.h>
+
+#include "gjs/jsapi-wrapper.h"
#include "gjs/jsapi-class.h"
#include "gjs/jsapi-util-args.h"
-#include "gjs/jsapi-wrapper.h"
-#include <cairo.h>
-#include "cairo-private.h"
+#include "gjs/jsapi-util.h"
+#include "gjs/macros.h"
+#include "modules/cairo-private.h"
GJS_USE
static JSObject *gjs_cairo_linear_gradient_get_proto(JSContext *);