Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - amdlintuxos

Pages: 1 [2]
16
System / warning comparison beetwen enums
« on: June 25, 2011, 10:27:58 pm »
Greeting all.
Actually that is not a big issue (code works fine), but compiler(g++) gives me a warnings and i have feeling that i am doing something not exactly correct.


Code: [Select]

        if (g_EVENT.Type == sf::Event::MouseButtonPressed)
        {
           if (g_EVENT.Key.Code == sf::Mouse::Left)              
              g_MOUSE_LEFT_BUTTON = true;

           if (g_EVENT.Key.Code == sf::Mouse::Right)
              g_MOUSE_RIGHT_BUTTON = true;
        }

And here what compilers says.

Quote

keyEventsInSpace.cpp:190:47: warning: comparison between ‘enum sf::Key::Code’ and ‘enum sf::Mouse::Button’
keyEventsInSpace.cpp:193:47: warning: comparison between ‘enum sf::Key::Code’ and ‘enum sf::Mouse::Button’


I know that is just a warnings and i may switched off those, but i am new in C++ and want to learn how to do things right.


Many thanks for attention in advance.

17
SFML projects / M.A.R.S. - a random shooter
« on: April 24, 2011, 08:59:55 pm »
MarsCoreTeam
awesome work!

Pages: 1 [2]
anything