Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extensive cleanup of unit animation frame code
The majority of which consists of code formatting, but also a few small semantic changes (tristate -> boost::tribool, etc).
- Loading branch information
Showing
4 changed files
with
982 additions
and
713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
42f087a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tristate isn't quite the same semantically as a tribool, since the third state is not technically an indeterminate state but rather a distinct value... but it should probably be fine as long as you don't try to do boolean operations on these tribools.
42f087a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CelticMinstrel actually, boost::tribool supports conversion to bool.
true
istrue
, while any other value isfalse
. The old tristate functioned much the same way, only difference being thetristate_to_bool
function accepted an argument for a retval if the tristate equaledt_unset
. The single usecase defaulted totrue
in that case... which actually makes me realize I made a mistake here. Hang on :/42f087a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you misunderstood the complaint here. Basically, you've changed
tristate
totribool
, when the actual original semantic oftristate
wasoptional<bool>
. Both have three possible values, but the meaning of the third value is quite different.Sure it'll work this way, but it might get someone confused later on.