Sign in to follow this  
  • entries
    375
  • comments
    1136
  • views
    297490

Something that could be done better

Sign in to follow this  
superpig

101 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