Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    375
  • comments
    1136
  • views
    298338

Something that could be done better

Sign in to follow this  
superpig

124 views

This is how OIS code actually looks:


OIS::Keyboard* keyboard = static_cast(inputSystem->createInputObject(OIS::OISKeyboard, false));



Compare:


OIS::Keyboard* keyboard = OIS::Keyboard::Create(inputSystem, false);



No typecodes. No casting.
Sign in to follow this  


3 Comments


Recommended Comments

Because there is no OIS::Keyboard::Create function in OIS. Their design requires that you use the first snippet.

I guess I could submit a patch or something.

Share this comment


Link to comment
You can partially blame me for having to do that :) I made the exact same change you did but I didn't submit a patch for it.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!