diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2019-05-31 23:40:53 -0700 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2019-06-08 23:11:29 -0700 |
commit | 01920362be26a2cb4e38b55cc211351391885d1d (patch) | |
tree | e82cc9c7af565610eb756ea5a561dbd83359d9a0 /gi/arg.cpp | |
parent | e9d108c4a67a45bc2caf5429736f164956f6c9dc (diff) | |
download | gjs-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/arg.cpp')
-rw-r--r-- | gi/arg.cpp | 46 |
1 files changed, 28 insertions, 18 deletions
@@ -21,25 +21,35 @@ * IN THE SOFTWARE. */ -#include <config.h> - -#include <cmath> -#include <cstdlib> - -#include "arg.h" -#include "gtype.h" -#include "object.h" -#include "interface.h" -#include "foreign.h" -#include "fundamental.h" -#include "boxed.h" -#include "union.h" -#include "param.h" -#include "value.h" -#include "gerror.h" -#include "gjs/byteArray.h" +#include <string.h> // for strcmp, strlen, memcpy + +#include <cmath> // for std::abs +#include <limits> // for numeric_limits +#include <string> + +#include <girepository.h> +#include <glib-object.h> +#include <glib.h> + #include "gjs/jsapi-wrapper.h" -#include <util/log.h> + +#include "gi/arg.h" +#include "gi/boxed.h" +#include "gi/foreign.h" +#include "gi/fundamental.h" +#include "gi/gerror.h" +#include "gi/gtype.h" +#include "gi/interface.h" +#include "gi/object.h" +#include "gi/param.h" +#include "gi/union.h" +#include "gi/value.h" +#include "gi/wrapperutils.h" +#include "gjs/atoms.h" +#include "gjs/byteArray.h" +#include "gjs/context-private.h" +#include "gjs/jsapi-util.h" +#include "util/log.h" bool _gjs_flags_value_is_valid(JSContext* context, GType gtype, int64_t value) { GFlagsValue *v; |