Sanitize #include statements

The general rule I'm aiming for is to <> include
system wide / installed paths / generally everything
that's outside the git managed source tree (this means
mruby paths too!), and "" include everything else,
ie. local mkxp headers.

The only current exception are the mri headers, which
all have './' at their front as to not clash with
system wide ruby headers. I'm leaving them be for now
until I can come up with a better general solution.
This commit is contained in:
Jonas Kulla 2013-12-04 17:48:37 +01:00
parent 9a63140f3e
commit ef2430e0c3
45 changed files with 104 additions and 108 deletions

View File

@ -28,9 +28,9 @@
#include "./ruby/include/ruby.h" #include "./ruby/include/ruby.h"
#include "./ruby/include/ruby/encoding.h" #include "./ruby/include/ruby/encoding.h"
#include "zlib.h" #include <zlib.h>
#include "SDL_filesystem.h" #include <SDL_filesystem.h>
#include <QFile> #include <QFile>
#include <QByteArray> #include <QByteArray>

View File

@ -21,23 +21,23 @@
#include "binding.h" #include "binding.h"
#include "mruby.h" #include <mruby.h>
#include "mruby/string.h" #include <mruby/string.h>
#include "mruby/array.h" #include <mruby/array.h>
#include "mruby/class.h" #include <mruby/class.h>
#include "mruby/irep.h" #include <mruby/irep.h>
#include "mruby/compile.h" #include <mruby/compile.h>
#include "mruby/proc.h" #include <mruby/proc.h>
#include "mruby/dump.h" #include <mruby/dump.h>
#include "binding-util.h" #include "binding-util.h"
#include "stdio.h" #include <stdio.h>
#include "zlib.h" #include <zlib.h>
#include "SDL_messagebox.h" #include <SDL_messagebox.h>
#include "SDL_rwops.h" #include <SDL_rwops.h>
#include "SDL_timer.h" #include <SDL_timer.h>
#include "sharedstate.h" #include "sharedstate.h"
#include "texpool.h" #include "texpool.h"

View File

@ -22,10 +22,10 @@
#ifndef BINDINGUTIL_H #ifndef BINDINGUTIL_H
#define BINDINGUTIL_H #define BINDINGUTIL_H
#include "mruby.h" #include <mruby.h>
#include "mruby/data.h" #include <mruby/data.h>
#include "mruby/variable.h" #include <mruby/variable.h>
#include "mruby/class.h" #include <mruby/class.h>
#include <stdio.h> #include <stdio.h>

View File

@ -23,7 +23,6 @@
#include "binding-util.h" #include "binding-util.h"
#include "binding-types.h" #include "binding-types.h"
#include "serializable-binding.h" #include "serializable-binding.h"
#include "mruby/class.h"
#include <QDebug> #include <QDebug>

View File

@ -24,7 +24,7 @@
#include "binding-types.h" #include "binding-types.h"
#include "exception.h" #include "exception.h"
#include "mruby/string.h" #include <mruby/string.h>
DEF_TYPE(Font); DEF_TYPE(Font);

View File

@ -21,7 +21,6 @@
#include "graphics.h" #include "graphics.h"
#include "sharedstate.h" #include "sharedstate.h"
#include "mruby.h"
#include "binding-util.h" #include "binding-util.h"
#include "exception.h" #include "exception.h"

View File

@ -22,11 +22,11 @@
#include "file.h" #include "file.h"
#include "../binding-util.h" #include "../binding-util.h"
#include "mruby/string.h" #include <mruby/string.h>
#include "mruby/array.h" #include <mruby/array.h>
#include "mruby/class.h" #include <mruby/class.h>
#include "SDL_rwops.h" #include <SDL_rwops.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>

View File

@ -24,7 +24,7 @@
#include "../binding-util.h" #include "../binding-util.h"
#include "SDL_rwops.h" #include <SDL_rwops.h>
struct FileImpl struct FileImpl
{ {

View File

@ -19,14 +19,14 @@
** along with mkxp. If not, see <http://www.gnu.org/licenses/>. ** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "mruby.h" #include <mruby.h>
#include "mruby/string.h" #include <mruby/string.h>
#include "mruby/compile.h" #include <mruby/compile.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/time.h> #include <sys/time.h>
#include "SDL_messagebox.h" #include <SDL_messagebox.h>
#include "../binding-util.h" #include "../binding-util.h"
#include "marshal.h" #include "marshal.h"

View File

@ -21,12 +21,12 @@
#include "marshal.h" #include "marshal.h"
#include "mruby/array.h" #include <mruby/array.h>
#include "mruby/hash.h" #include <mruby/hash.h>
#include "mruby/khash.h" #include <mruby/khash.h>
#include "mruby/string.h" #include <mruby/string.h>
#include "mruby/variable.h" #include <mruby/variable.h>
#include "mruby/class.h" #include <mruby/class.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -38,7 +38,7 @@
#include "rwmem.h" #include "rwmem.h"
#include "exception.h" #include "exception.h"
#include "SDL_timer.h" #include <SDL_timer.h>
#include <QVector> #include <QVector>
#include <QHash> #include <QHash>

View File

@ -22,8 +22,8 @@
#ifndef MARSHAL_H #ifndef MARSHAL_H
#define MARSHAL_H #define MARSHAL_H
#include "mruby.h" #include <mruby.h>
#include "SDL_rwops.h" #include <SDL_rwops.h>
void marshalDumpInt(mrb_state *, SDL_RWops *, mrb_value); void marshalDumpInt(mrb_state *, SDL_RWops *, mrb_value);
mrb_value marshalLoadInt(mrb_state *, SDL_RWops *); mrb_value marshalLoadInt(mrb_state *, SDL_RWops *);

View File

@ -21,7 +21,7 @@
#include "rwmem.h" #include "rwmem.h"
#include "SDL_rwops.h" #include <SDL_rwops.h>
#include <QVector> #include <QVector>
typedef QVector<char> ByteVec; typedef QVector<char> ByteVec;

View File

@ -20,9 +20,10 @@
*/ */
#include "../binding-util.h" #include "../binding-util.h"
#include "mruby/string.h"
#include "mruby/array.h" #include <mruby/string.h>
#include "mruby/class.h" #include <mruby/array.h>
#include <mruby/class.h>
#include "time.h" #include "time.h"
#include <sys/time.h> #include <sys/time.h>

View File

@ -25,7 +25,7 @@
#include "serializable.h" #include "serializable.h"
#include "binding-util.h" #include "binding-util.h"
#include "mruby/string.h" #include <mruby/string.h>
template<class C> template<class C>
MRB_METHOD(serializableDump) MRB_METHOD(serializableDump)

View File

@ -24,8 +24,6 @@
#include "binding-types.h" #include "binding-types.h"
#include "serializable-binding.h" #include "serializable-binding.h"
#include "mruby.h"
#include <QDebug> #include <QDebug>
DEF_TYPE(Table); DEF_TYPE(Table);

View File

@ -28,7 +28,7 @@
#include "binding-util.h" #include "binding-util.h"
#include "binding-types.h" #include "binding-types.h"
#include "mruby/array.h" #include <mruby/array.h>
static const mrb_data_type TilemapAutotilesType = static const mrb_data_type TilemapAutotilesType =
{ {

View File

@ -21,12 +21,12 @@
#include "bitmap.h" #include "bitmap.h"
#include "SDL.h" #include <SDL.h>
#include "SDL_image.h" #include <SDL_image.h>
#include "SDL_ttf.h" #include <SDL_ttf.h>
#include "SDL_rect.h" #include <SDL_rect.h>
#include "pixman.h" #include <pixman.h>
#include <QString> #include <QString>
#include <QChar> #include <QChar>

View File

@ -26,7 +26,7 @@
#include "etc-internal.h" #include "etc-internal.h"
#include "etc.h" #include "etc.h"
#include "sigc++/signal.h" #include <sigc++/signal.h>
class Font; class Font;
class ShaderBase; class ShaderBase;

View File

@ -21,7 +21,7 @@
#include "debuglogger.h" #include "debuglogger.h"
#include "glew.h" #include <glew.h>
#include <QFile> #include <QFile>
#include <QTime> #include <QTime>

View File

@ -24,7 +24,7 @@
#include "exception.h" #include "exception.h"
#include "sigc++/signal.h" #include <sigc++/signal.h>
class Disposable class Disposable
{ {

View File

@ -24,8 +24,8 @@
#include "serial-util.h" #include "serial-util.h"
#include "exception.h" #include "exception.h"
#include "SDL_types.h" #include <SDL_types.h>
#include "SDL_pixels.h" #include <SDL_pixels.h>
Color::Color(double red, double green, double blue, double alpha) Color::Color(double red, double green, double blue, double alpha)
: red(red), green(green), blue(blue), alpha(alpha) : red(red), green(green), blue(blue), alpha(alpha)

View File

@ -22,7 +22,7 @@
#ifndef ETC_H #ifndef ETC_H
#define ETC_H #define ETC_H
#include "sigc++/signal.h" #include <sigc++/signal.h>
#include "serializable.h" #include "serializable.h"
#include "etc-internal.h" #include "etc-internal.h"

View File

@ -21,16 +21,16 @@
#include "eventthread.h" #include "eventthread.h"
#include "SDL_events.h" #include <SDL_events.h>
#include "SDL_joystick.h" #include <SDL_joystick.h>
#include "SDL_messagebox.h" #include <SDL_messagebox.h>
#include "SDL_timer.h" #include <SDL_timer.h>
#include "SDL_thread.h" #include <SDL_thread.h>
#include "sharedstate.h" #include "sharedstate.h"
#include "graphics.h" #include "graphics.h"
#include "string.h" #include <string.h>
#include <QDebug> #include <QDebug>

View File

@ -25,11 +25,10 @@
#include "config.h" #include "config.h"
#include "etc-internal.h" #include "etc-internal.h"
#include "SDL_scancode.h" #include <SDL_scancode.h>
#include "SDL_joystick.h" #include <SDL_joystick.h>
#include "SDL_mouse.h" #include <SDL_mouse.h>
#include <SDL_mutex.h>
#include "SDL_mutex.h"
#include <QByteArray> #include <QByteArray>
#include <QVector> #include <QVector>

View File

@ -24,7 +24,7 @@
#include "util.h" #include "util.h"
#include "exception.h" #include "exception.h"
#include "physfs.h" #include <physfs.h>
#include <SDL_sound.h> #include <SDL_sound.h>
@ -32,8 +32,8 @@
#include <QSet> #include <QSet>
#include <QByteArray> #include <QByteArray>
#include "stdio.h" #include <stdio.h>
#include "string.h" #include <string.h>
#include <QDebug> #include <QDebug>

View File

@ -22,7 +22,7 @@
#ifndef FILESYSTEM_H #ifndef FILESYSTEM_H
#define FILESYSTEM_H #define FILESYSTEM_H
#include "SDL_rwops.h" #include <SDL_rwops.h>
struct FileSystemPrivate; struct FileSystemPrivate;

View File

@ -27,7 +27,7 @@
#include "../liberation.ttf.xxd" #include "../liberation.ttf.xxd"
#include "SDL_ttf.h" #include <SDL_ttf.h>
#include <QHash> #include <QHash>
#include <QByteArray> #include <QByteArray>

View File

@ -22,10 +22,9 @@
#ifndef GLUTIL_H #ifndef GLUTIL_H
#define GLUTIL_H #define GLUTIL_H
#include "glew.h" #include <glew.h>
#include "etc-internal.h" #include "etc-internal.h"
#include <QDebug>
/* Struct wrapping GLuint for some light type safety */ /* Struct wrapping GLuint for some light type safety */
#define DEF_GL_ID \ #define DEF_GL_ID \

View File

@ -22,7 +22,7 @@
#ifndef GLOBALIBO_H #ifndef GLOBALIBO_H
#define GLOBALIBO_H #define GLOBALIBO_H
#include <gl-util.h> #include "gl-util.h"
#include <QVector> #include <QVector>
struct GlobalIBO struct GlobalIBO

View File

@ -20,10 +20,12 @@
*/ */
#include "glstate.h" #include "glstate.h"
#include "glew.h"
#include "SDL_rect.h"
#include "etc.h" #include "etc.h"
#include <glew.h>
#include <SDL_rect.h>
void GLClearColor::apply(const Vec4 &value) void GLClearColor::apply(const Vec4 &value)
{ {
glClearColor(value.x, value.y, value.z, value.w); glClearColor(value.x, value.y, value.z, value.w);

View File

@ -35,8 +35,8 @@
#include "binding.h" #include "binding.h"
#include "perftimer.h" #include "perftimer.h"
#include "SDL_video.h" #include <SDL_video.h>
#include "SDL_timer.h" #include <SDL_timer.h>
#include <time.h> #include <time.h>

View File

@ -25,11 +25,11 @@
#include "exception.h" #include "exception.h"
#include "util.h" #include "util.h"
#include "SDL_scancode.h" #include <SDL_scancode.h>
#include "SDL_mouse.h" #include <SDL_mouse.h>
#include <QVector> #include <QVector>
#include "string.h" #include <string.h>
#include <QDebug> #include <QDebug>

View File

@ -19,12 +19,12 @@
** along with mkxp. If not, see <http://www.gnu.org/licenses/>. ** along with mkxp. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include "glew.h" #include <glew.h>
#include <alc.h> #include <alc.h>
#include "SDL.h" #include <SDL.h>
#include "SDL_image.h" #include <SDL_image.h>
#include "SDL_ttf.h" #include <SDL_ttf.h>
#include <SDL_sound.h> #include <SDL_sound.h>
#include "sharedstate.h" #include "sharedstate.h"

View File

@ -1,7 +1,7 @@
#include "perftimer.h" #include "perftimer.h"
#include "SDL_timer.h" #include <SDL_timer.h>
#include "glew.h" #include <glew.h>
#include <QDebug> #include <QDebug>

View File

@ -25,9 +25,6 @@
#include "disposable.h" #include "disposable.h"
#include "viewport.h" #include "viewport.h"
#include "SFML/Graphics/Sprite.hpp"
#include "SFML/Graphics/RectangleShape.hpp"
class Bitmap; class Bitmap;
struct Color; struct Color;
struct Tone; struct Tone;

View File

@ -22,12 +22,13 @@
#ifndef QUADARRAY_H #ifndef QUADARRAY_H
#define QUADARRAY_H #define QUADARRAY_H
#include <QtGlobal>
#include "gl-util.h" #include "gl-util.h"
#include "sharedstate.h" #include "sharedstate.h"
#include "global-ibo.h" #include "global-ibo.h"
#include "shader.h" #include "shader.h"
#include <stdint.h>
typedef uint32_t index_t; typedef uint32_t index_t;
#define _GL_INDEX_TYPE GL_UNSIGNED_INT #define _GL_INDEX_TYPE GL_UNSIGNED_INT

View File

@ -23,7 +23,7 @@
#include "sharedstate.h" #include "sharedstate.h"
#include "glstate.h" #include "glstate.h"
#include "glew.h" #include <glew.h>
#include <QFile> #include <QFile>
@ -48,6 +48,8 @@
#include "../blurV.vert.xxd" #include "../blurV.vert.xxd"
#endif #endif
#include <QDebug>
#define INIT_SHADER(vert, frag) \ #define INIT_SHADER(vert, frag) \
{ \ { \

View File

@ -22,7 +22,7 @@
#ifndef SHAREDSTATE_H #ifndef SHAREDSTATE_H
#define SHAREDSTATE_H #define SHAREDSTATE_H
#include "sigc++/signal.h" #include <sigc++/signal.h>
#define shState SharedState::instance #define shState SharedState::instance
#define glState shState->_glState() #define glState shState->_glState()

View File

@ -33,7 +33,7 @@
#include "shader.h" #include "shader.h"
#include "glstate.h" #include "glstate.h"
#include "sigc++/connection.h" #include <sigc++/connection.h>
#include <QDebug> #include <QDebug>

View File

@ -25,7 +25,7 @@
#include "serializable.h" #include "serializable.h"
#include <stdint.h> #include <stdint.h>
#include "sigc++/signal.h" #include <sigc++/signal.h>
class Table : public Serializable class Table : public Serializable
{ {

View File

@ -34,14 +34,14 @@
#include "quad.h" #include "quad.h"
#include "tileatlas.h" #include "tileatlas.h"
#include "sigc++/connection.h" #include <sigc++/connection.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <QVector> #include <QVector>
#include "SDL_surface.h" #include <SDL_surface.h>
extern const StaticRect autotileRects[]; extern const StaticRect autotileRects[];

View File

@ -48,8 +48,9 @@
#define TRANSFORM_H #define TRANSFORM_H
#include "etc-internal.h" #include "etc-internal.h"
#include "math.h"
#include "string.h" #include <math.h>
#include <string.h>
class Transform class Transform
{ {

View File

@ -27,9 +27,9 @@
#include "quad.h" #include "quad.h"
#include "glstate.h" #include "glstate.h"
#include "SDL_rect.h" #include <SDL_rect.h>
#include "sigc++/connection.h" #include <sigc++/connection.h>
#include <QDebug> #include <QDebug>

View File

@ -27,8 +27,6 @@
#include "disposable.h" #include "disposable.h"
#include "util.h" #include "util.h"
#include "SFML/Graphics/Rect.hpp"
struct ViewportPrivate; struct ViewportPrivate;
class Viewport : public Scene, public SceneElement, public Flashable, public Disposable class Viewport : public Scene, public SceneElement, public Flashable, public Disposable

View File

@ -34,7 +34,7 @@
#include "texpool.h" #include "texpool.h"
#include "glstate.h" #include "glstate.h"
#include "sigc++/connection.h" #include <sigc++/connection.h>
#include <QDebug> #include <QDebug>