From 9d70da3aaa6ea783b4907f9fb89158754e31d4e7 Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Sat, 21 Nov 2015 18:44:38 +0100 Subject: [PATCH] Fixed and silenced a few warnings --- examples/cocoa/CocoaAppDelegate.mm | 2 +- examples/opengl/OpenGL.cpp | 4 ++-- include/SFML/Graphics/Glsl.inl | 5 ++++- src/SFML/Window/OSX/HIDInputManager.mm | 4 ++-- src/SFML/Window/OSX/HIDJoystickManager.cpp | 4 ++-- tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp | 2 +- tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp | 2 +- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/examples/cocoa/CocoaAppDelegate.mm b/examples/cocoa/CocoaAppDelegate.mm index 3afadf6a..87bc3b12 100644 --- a/examples/cocoa/CocoaAppDelegate.mm +++ b/examples/cocoa/CocoaAppDelegate.mm @@ -57,7 +57,7 @@ struct SFMLmainWindow if (!font.loadFromFile(resPath + "/sansation.ttf")) NSLog(@"Couldn't load the font"); - text.setColor(sf::Color::White); + text.setFillColor(sf::Color::White); text.setFont(font); } diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp index 6f927d80..f8079f9f 100644 --- a/examples/opengl/OpenGL.cpp +++ b/examples/opengl/OpenGL.cpp @@ -45,8 +45,8 @@ int main() return EXIT_FAILURE; sf::Text text("SFML / OpenGL demo", font); sf::Text instructions("Press space to toggle sRGB conversion", font); - text.setColor(sf::Color(255, 255, 255, 170)); - instructions.setColor(sf::Color(255, 255, 255, 170)); + text.setFillColor(sf::Color(255, 255, 255, 170)); + instructions.setFillColor(sf::Color(255, 255, 255, 170)); text.setPosition(250.f, 450.f); instructions.setPosition(150.f, 500.f); diff --git a/include/SFML/Graphics/Glsl.inl b/include/SFML/Graphics/Glsl.inl index bfdff1f1..b729b297 100644 --- a/include/SFML/Graphics/Glsl.inl +++ b/include/SFML/Graphics/Glsl.inl @@ -106,7 +106,10 @@ struct Vector4 //////////////////////////////////////////////////////////// /// \brief Construct from 4 vector components /// - /// \param X,Y,Z,W Components of the 4D vector + /// \param X Component of the 4D vector + /// \param Y Component of the 4D vector + /// \param Z Component of the 4D vector + /// \param W Component of the 4D vector /// //////////////////////////////////////////////////////////// Vector4(T X, T Y, T Z, T W) : diff --git a/src/SFML/Window/OSX/HIDInputManager.mm b/src/SFML/Window/OSX/HIDInputManager.mm index 37ef79e1..f0c44a7f 100644 --- a/src/SFML/Window/OSX/HIDInputManager.mm +++ b/src/SFML/Window/OSX/HIDInputManager.mm @@ -763,7 +763,7 @@ Keyboard::Key HIDInputManager::nonLocalizedKeys(UniChar virtualKeycode) case 0x2c: return sf::Keyboard::Slash; case 0x2a: return sf::Keyboard::BackSlash; -#warning sf::Keyboard::Tilde might be in conflict with some other key. + // sf::Keyboard::Tilde might be in conflict with some other key. // 0x0a is for "Non-US Backslash" according to HID Calibrator, // a sample provided by Apple. case 0x0a: return sf::Keyboard::Tilde; @@ -855,7 +855,7 @@ Keyboard::Key HIDInputManager::nonLocalizedKeys(UniChar virtualKeycode) case NSPauseFunctionKey: return sf::Keyboard::Pause; -#warning keycode 0x1b is not bound to any key. + // keycode 0x1b is not bound to any key. // This key is ' on CH-FR, ) on FR and - on US layouts. // An unknown key. diff --git a/src/SFML/Window/OSX/HIDJoystickManager.cpp b/src/SFML/Window/OSX/HIDJoystickManager.cpp index 1724fe62..0223eca5 100644 --- a/src/SFML/Window/OSX/HIDJoystickManager.cpp +++ b/src/SFML/Window/OSX/HIDJoystickManager.cpp @@ -133,7 +133,7 @@ void HIDJoystickManager::update() //////////////////////////////////////////////////////////// void HIDJoystickManager::pluggedIn(void* context, IOReturn, void*, IOHIDDeviceRef) { - HIDJoystickManager* manager = (HIDJoystickManager*)context; + HIDJoystickManager* manager = static_cast(context); manager->m_joystickCount++; } @@ -141,7 +141,7 @@ void HIDJoystickManager::pluggedIn(void* context, IOReturn, void*, IOHIDDeviceRe //////////////////////////////////////////////////////////// void HIDJoystickManager::pluggedOut(void* context, IOReturn, void*, IOHIDDeviceRef) { - HIDJoystickManager* manager = (HIDJoystickManager*)context; + HIDJoystickManager* manager = static_cast(context); manager->m_joystickCount--; } diff --git a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp index 03598cbb..d34ede6a 100644 --- a/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML App.xctemplate/main.cpp @@ -45,7 +45,7 @@ int main(int, char const**) return EXIT_FAILURE; } sf::Text text("Hello SFML", font, 50); - text.setColor(sf::Color::Black); + text.setFillColor(sf::Color::Black); // Load a music to play sf::Music music; diff --git a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp index dda3255c..37c0a7f6 100644 --- a/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp +++ b/tools/xcode/templates/SFML/SFML CLT.xctemplate/main.cpp @@ -43,7 +43,7 @@ int main(int argc, char const** argv) return EXIT_FAILURE; } sf::Text text("Hello SFML", font, 50); - text.setColor(sf::Color::Black); + text.setFillColor(sf::Color::Black); // Load a music to play sf::Music music;