Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@geoffthemedio
Copy link
Member

...

@geoffthemedio geoffthemedio added component:internal The Issue/PR deals with any project component that has no explicit `component` label. category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. labels Oct 4, 2025
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);

Copy link
Contributor

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.

Copy link
Member Author

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.

@geoffthemedio geoffthemedio force-pushed the scratch24 branch 4 times, most recently from 366be84 to 311b2e5 Compare October 11, 2025 17:56
@o01eg o01eg added this to the v0.5.2 Release milestone Oct 13, 2025
-remove unused MapKeys function
-remove unused function
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:internal The Issue/PR deals with any project component that has no explicit `component` label.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants