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

Author Topic: Convert keyboard::key into char  (Read 9993 times)

0 Members and 1 Guest are viewing this topic.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Convert keyboard::key into char
« Reply #15 on: May 14, 2014, 11:05:01 am »
I wouldn't say it's faster, either.

Modern compilers are definitely able to transform switch with consecutive constants into a linear jump table. The only thing I could think of is that they need to conservatively insert a condition for the default label, but even this could be optimized using non-portable techniques like __assume(false).
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: