Skip to content

Accept truncations in pops smaller than 16#740

Open
wvpm wants to merge 1 commit into
masterfrom
accept_small_pop_truncation
Open

Accept truncations in pops smaller than 16#740
wvpm wants to merge 1 commit into
masterfrom
accept_small_pop_truncation

Conversation

@wvpm
Copy link
Copy Markdown
Contributor

@wvpm wvpm commented May 18, 2026

Truncations are bound to happen with fixed point math. At a certain pop size we just have to accept it to avoid spamming warnings.

@wvpm wvpm requested a review from a team as a code owner May 18, 2026 22:45
@wvpm wvpm added enhancement New feature or request topic:economy labels May 18, 2026
@wvpm wvpm enabled auto-merge May 18, 2026 22:47
template<bool IsTaxable>
void Pop::add_artisanal_revenue(const fixed_point_t revenue) {
if (OV_unlikely(revenue == 0)) {
if (OV_unlikely(revenue == 0 && size >= TRUNCATION_ACCEPTABLE_BELOW_SIZE)) {
Copy link
Copy Markdown

@schombert schombert May 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that you didn't mean <= ? (this applies below as well)
(and maybe || as well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request topic:economy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants