From c3fd7a25a334b6fa5f4c292275ee9c434b354d02 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sat, 23 May 2015 12:45:58 -0300 Subject: [PATCH] Fixed some misc. compiler warnings. --- src/common/Exception.cpp | 4 ++ src/common/Exception.h | 2 +- src/common/runtime.h | 3 -- src/modules/filesystem/wrap_Filesystem.h | 2 + src/modules/graphics/opengl/GLBuffer.h | 1 - .../image/magpie/CompressedFormatHandler.h | 2 +- src/modules/keyboard/wrap_Keyboard.h | 2 +- src/modules/math/Compressor.h | 2 +- src/modules/math/MathModule.h | 4 +- src/modules/mouse/sdl/Mouse.h | 40 +++++++++---------- 10 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/common/Exception.cpp b/src/common/Exception.cpp index 45a7097b1..d41ce5aa1 100644 --- a/src/common/Exception.cpp +++ b/src/common/Exception.cpp @@ -60,4 +60,8 @@ Exception::Exception(const char *fmt, ...) delete[] buffer; } +Exception::~Exception() throw() +{ +} + } diff --git a/src/common/Exception.h b/src/common/Exception.h index 84685b9a7..53ef0c3df 100644 --- a/src/common/Exception.h +++ b/src/common/Exception.h @@ -45,7 +45,7 @@ public: * @param fmt The format string (see printf). **/ Exception(const char *fmt, ...); - virtual ~Exception() throw() {} + virtual ~Exception() throw(); /** * Returns a string containing reason for the exception. diff --git a/src/common/runtime.h b/src/common/runtime.h index e9ad9e64c..af13de335 100644 --- a/src/common/runtime.h +++ b/src/common/runtime.h @@ -275,7 +275,6 @@ int luax_register_searcher(lua_State *L, lua_CFunction f, int pos = -1); * storing the Lua representation in a weak table if it doesn't exist yet. * NOTE: The object will be retained by Lua and released upon garbage collection. * @param L The Lua state. - * @param name The name of the type. This must match the name used with luax_register_type. * @param type The type information of the object. * @param object The pointer to the actual object. **/ @@ -289,7 +288,6 @@ void luax_pushtype(lua_State *L, const love::Type type, love::Object *object); * Lua-side objects from working in some cases when used as keys in tables. * NOTE: The object will be retained by Lua and released upon garbage collection. * @param L The Lua state. - * @param name The name of the type. This must match the name used with luax_register_type. * @param type The type information of the object. * @param object The pointer to the actual object. **/ @@ -400,7 +398,6 @@ extern "C" { // Also called from luasocket * or is not the specified type. * @param L The Lua state. * @param idx The index on the stack. - * @param name The name of the type. * @param type The type bit. **/ template diff --git a/src/modules/filesystem/wrap_Filesystem.h b/src/modules/filesystem/wrap_Filesystem.h index b1db58145..38ffa0b6f 100644 --- a/src/modules/filesystem/wrap_Filesystem.h +++ b/src/modules/filesystem/wrap_Filesystem.h @@ -75,6 +75,8 @@ int w_getSize(lua_State *L); int w_setSymlinksEnabled(lua_State *L); int w_areSymlinksEnabled(lua_State *L); int w_isSymlink(lua_State *L); +int w_getRequirePath(lua_State *L); +int w_setRequirePath(lua_State *L); int loader(lua_State *L); int extloader(lua_State *L); extern "C" LOVE_EXPORT int luaopen_love_filesystem(lua_State *L); diff --git a/src/modules/graphics/opengl/GLBuffer.h b/src/modules/graphics/opengl/GLBuffer.h index 4a4f68271..aac2bbf48 100644 --- a/src/modules/graphics/opengl/GLBuffer.h +++ b/src/modules/graphics/opengl/GLBuffer.h @@ -53,7 +53,6 @@ public: * @param size The size of the GLBuffer in bytes. * @param target The target GLBuffer object, e.g. GL_ARRAY_BUFFER. * @param usage Usage hint, e.g. GL_DYNAMIC_DRAW. - * @param backing Determines what guarantees are placed on the data. */ GLBuffer(size_t size, const void *data, GLenum target, GLenum usage); diff --git a/src/modules/image/magpie/CompressedFormatHandler.h b/src/modules/image/magpie/CompressedFormatHandler.h index d371e3b79..a721fe957 100644 --- a/src/modules/image/magpie/CompressedFormatHandler.h +++ b/src/modules/image/magpie/CompressedFormatHandler.h @@ -56,7 +56,7 @@ public: * a single block of memory containing all the images. * * @param[in] filedata The data to parse. - * @param[out] image The list of sub-images generated. Byte data is a pointer + * @param[out] images The list of sub-images generated. Byte data is a pointer * to the returned data. * @param[out] dataSize The total size in bytes of the returned data. * @param[out] format The format of the Compressed Data. diff --git a/src/modules/keyboard/wrap_Keyboard.h b/src/modules/keyboard/wrap_Keyboard.h index 952fe018a..30f47117e 100644 --- a/src/modules/keyboard/wrap_Keyboard.h +++ b/src/modules/keyboard/wrap_Keyboard.h @@ -35,7 +35,7 @@ int w_hasKeyRepeat(lua_State *L); int w_isDown(lua_State *L); int w_isScancodeDown(lua_State *L); int w_getKeyFromScancode(lua_State *L); -int w_getScancodeFromkey(lua_State *L); +int w_getScancodeFromKey(lua_State *L); int w_setTextInput(lua_State *L); int w_hasTextInput(lua_State *L); int w_hasScreenKeyboard(lua_State *L); diff --git a/src/modules/math/Compressor.h b/src/modules/math/Compressor.h index 0b242fcac..d253e62c5 100644 --- a/src/modules/math/Compressor.h +++ b/src/modules/math/Compressor.h @@ -70,7 +70,7 @@ public: * * @param[in] data The input (compressed) data. * @param[in] dataSize The size in bytes of the compressed data. - * @param[inout] decompressedSize On input, the size in bytes of the + * @param[in,out] decompressedSize On input, the size in bytes of the * original uncompressed data, or 0 if unknown. On return, the * size in bytes of the decompressed data. * diff --git a/src/modules/math/MathModule.h b/src/modules/math/MathModule.h index d8ddc4fea..b2af72659 100644 --- a/src/modules/math/MathModule.h +++ b/src/modules/math/MathModule.h @@ -191,8 +191,8 @@ public: * * @param[in] format The compression format the data is in. * @param[in] cbytes The compressed data to decompress. - * @param[in] compressedSize The size in bytes of the compressed data. - * @param[inout] rawsize On input, the size in bytes of the original + * @param[in] compressedsize The size in bytes of the compressed data. + * @param[in,out] rawsize On input, the size in bytes of the original * uncompressed data, or 0 if unknown. On return, the size in * bytes of the newly decompressed data. * @return The newly decompressed data (allocated with new[]). diff --git a/src/modules/mouse/sdl/Mouse.h b/src/modules/mouse/sdl/Mouse.h index f2682d9c4..bf93cab11 100644 --- a/src/modules/mouse/sdl/Mouse.h +++ b/src/modules/mouse/sdl/Mouse.h @@ -43,31 +43,31 @@ public: const char *getName() const override; Mouse(); - ~Mouse(); + virtual ~Mouse(); - love::mouse::Cursor *newCursor(love::image::ImageData *data, int hotx, int hoty); - love::mouse::Cursor *getSystemCursor(Cursor::SystemCursor cursortype); + love::mouse::Cursor *newCursor(love::image::ImageData *data, int hotx, int hoty) override; + love::mouse::Cursor *getSystemCursor(Cursor::SystemCursor cursortype) override; - void setCursor(love::mouse::Cursor *cursor); - void setCursor(); + void setCursor(love::mouse::Cursor *cursor) override; + void setCursor() override; - love::mouse::Cursor *getCursor() const; + love::mouse::Cursor *getCursor() const override; - bool hasCursor() const; + bool hasCursor() const override; - double getX() const; - double getY() const; - void getPosition(double &x, double &y) const; - void setX(double x); - void setY(double y); - void setPosition(double x, double y); - void setVisible(bool visible); - bool isDown(const std::vector &buttons) const; - bool isVisible() const; - void setGrabbed(bool grab); - bool isGrabbed() const; - bool setRelativeMode(bool relative); - bool getRelativeMode() const; + double getX() const override; + double getY() const override; + void getPosition(double &x, double &y) const override; + void setX(double x) override; + void setY(double y) override; + void setPosition(double x, double y) override; + void setVisible(bool visible) override; + bool isDown(const std::vector &buttons) const override; + bool isVisible() const override; + void setGrabbed(bool grab) override; + bool isGrabbed() const override; + bool setRelativeMode(bool relative) override; + bool getRelativeMode() const override; private: