mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed and silenced a few warnings
This commit is contained in:
parent
c98a84a5d8
commit
9d70da3aaa
@ -57,7 +57,7 @@ struct SFMLmainWindow
|
|||||||
if (!font.loadFromFile(resPath + "/sansation.ttf"))
|
if (!font.loadFromFile(resPath + "/sansation.ttf"))
|
||||||
NSLog(@"Couldn't load the font");
|
NSLog(@"Couldn't load the font");
|
||||||
|
|
||||||
text.setColor(sf::Color::White);
|
text.setFillColor(sf::Color::White);
|
||||||
text.setFont(font);
|
text.setFont(font);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ int main()
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
sf::Text text("SFML / OpenGL demo", font);
|
sf::Text text("SFML / OpenGL demo", font);
|
||||||
sf::Text instructions("Press space to toggle sRGB conversion", font);
|
sf::Text instructions("Press space to toggle sRGB conversion", font);
|
||||||
text.setColor(sf::Color(255, 255, 255, 170));
|
text.setFillColor(sf::Color(255, 255, 255, 170));
|
||||||
instructions.setColor(sf::Color(255, 255, 255, 170));
|
instructions.setFillColor(sf::Color(255, 255, 255, 170));
|
||||||
text.setPosition(250.f, 450.f);
|
text.setPosition(250.f, 450.f);
|
||||||
instructions.setPosition(150.f, 500.f);
|
instructions.setPosition(150.f, 500.f);
|
||||||
|
|
||||||
|
@ -106,7 +106,10 @@ struct Vector4
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Construct from 4 vector components
|
/// \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) :
|
Vector4(T X, T Y, T Z, T W) :
|
||||||
|
@ -763,7 +763,7 @@ Keyboard::Key HIDInputManager::nonLocalizedKeys(UniChar virtualKeycode)
|
|||||||
case 0x2c: return sf::Keyboard::Slash;
|
case 0x2c: return sf::Keyboard::Slash;
|
||||||
case 0x2a: return sf::Keyboard::BackSlash;
|
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,
|
// 0x0a is for "Non-US Backslash" according to HID Calibrator,
|
||||||
// a sample provided by Apple.
|
// a sample provided by Apple.
|
||||||
case 0x0a: return sf::Keyboard::Tilde;
|
case 0x0a: return sf::Keyboard::Tilde;
|
||||||
@ -855,7 +855,7 @@ Keyboard::Key HIDInputManager::nonLocalizedKeys(UniChar virtualKeycode)
|
|||||||
|
|
||||||
case NSPauseFunctionKey: return sf::Keyboard::Pause;
|
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.
|
// This key is ' on CH-FR, ) on FR and - on US layouts.
|
||||||
|
|
||||||
// An unknown key.
|
// An unknown key.
|
||||||
|
@ -133,7 +133,7 @@ void HIDJoystickManager::update()
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void HIDJoystickManager::pluggedIn(void* context, IOReturn, void*, IOHIDDeviceRef)
|
void HIDJoystickManager::pluggedIn(void* context, IOReturn, void*, IOHIDDeviceRef)
|
||||||
{
|
{
|
||||||
HIDJoystickManager* manager = (HIDJoystickManager*)context;
|
HIDJoystickManager* manager = static_cast<HIDJoystickManager*>(context);
|
||||||
manager->m_joystickCount++;
|
manager->m_joystickCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ void HIDJoystickManager::pluggedIn(void* context, IOReturn, void*, IOHIDDeviceRe
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
void HIDJoystickManager::pluggedOut(void* context, IOReturn, void*, IOHIDDeviceRef)
|
void HIDJoystickManager::pluggedOut(void* context, IOReturn, void*, IOHIDDeviceRef)
|
||||||
{
|
{
|
||||||
HIDJoystickManager* manager = (HIDJoystickManager*)context;
|
HIDJoystickManager* manager = static_cast<HIDJoystickManager*>(context);
|
||||||
manager->m_joystickCount--;
|
manager->m_joystickCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ int main(int, char const**)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
sf::Text text("Hello SFML", font, 50);
|
sf::Text text("Hello SFML", font, 50);
|
||||||
text.setColor(sf::Color::Black);
|
text.setFillColor(sf::Color::Black);
|
||||||
|
|
||||||
// Load a music to play
|
// Load a music to play
|
||||||
sf::Music music;
|
sf::Music music;
|
||||||
|
@ -43,7 +43,7 @@ int main(int argc, char const** argv)
|
|||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
sf::Text text("Hello SFML", font, 50);
|
sf::Text text("Hello SFML", font, 50);
|
||||||
text.setColor(sf::Color::Black);
|
text.setFillColor(sf::Color::Black);
|
||||||
|
|
||||||
// Load a music to play
|
// Load a music to play
|
||||||
sf::Music music;
|
sf::Music music;
|
||||||
|
Loading…
Reference in New Issue
Block a user