-
Notifications
You must be signed in to change notification settings - Fork 165
Misc. Tweaks #5321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Misc. Tweaks #5321
Conversation
| const int low = (m_low ? std::max(0, m_low->Eval(local_context)) : 0); | ||
| if (low == 1 && !m_high) | ||
| return m_condition->EvalAny(local_context); | ||
|
|
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.
hm; probably not worth it (as Number condition is not used that much), but wouldn't it make sense to have optional bounds on EvalAny (context, low, high)? Then also evaluation other specific numbers would be optimal.
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.
Even if it's not used much, if this lets a potentially more efficient EvalAny override be used in some cases, the cost of the extra check is probably negligible...
Number is used in numerous places. But what's more surprising to me is that it's so often used with low = 2. Possibly some of those could be replace with alternative conditions with equivalent logic.
Optional bounds on an Eval variant wouldn't use EvalAny but rather a new override. It's a lot more complicated to set that up than using EvalAny, which is already partly implemented.
366be84 to
311b2e5
Compare
311b2e5 to
07c8155
Compare
…n Number::Match but no upper limit
…er::Match, with no lower limit or a lower limit of 0
-remove redundant low=1 in Enqueued conditions
-Not Number low = 2 ... to Number high = 1 ...
-use persistent storage array objects for colours
-inline EmpireHasAdoptedPolicy constructors
07c8155 to
a507d01
Compare
-ensure call order correctness -comments
-grooming
-remove unused MapKeys function
…th of a RichText TextBlock
…h FORMAT_IGNORETAGS added -add RichText::SetUnformattedText that creates such a TextBlock
-extract params later
-override block factory for unformatted text in pedia -use that for showing stringtable contents instead of the default TextBlock, so as to allow text selection
73bdadf to
6e06226
Compare
...