The one liner is fine. 

An enum class is internally always represented as an (unsigned) int, but since 
enum class are guaranteed to be typesafe you must explicitly tell the compiler 
to interpret the integer as another type, ergo the static_cast is needed.

Good catch! Since when was this broken?
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1422452/+merge/250232
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1422452 into lp:widelands.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to