• entries
375
1136
• views
297490

# Something that could be done better

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.

The question being then: why did you even wrote the first version [grin]

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.

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.

## Create an account

Register a new account