summaryrefslogtreecommitdiff
path: root/gi/toggle.h
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 /gi/toggle.h
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 'gi/toggle.h')
-rw-r--r--gi/toggle.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gi/toggle.h b/gi/toggle.h
index 44db802f..fa7e01ae 100644
--- a/gi/toggle.h
+++ b/gi/toggle.h
@@ -29,7 +29,10 @@
#include <atomic>
#include <deque>
#include <mutex>
+#include <utility> // for pair
+
#include <glib-object.h>
+#include <glib.h>
#include "gjs/macros.h"
#include "util/log.h"