Skip to content
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

-O3 flag causes compiler error on ECS QueryFilter #1352

Merged
merged 2 commits into from
Nov 17, 2024

Conversation

SrGesus
Copy link
Contributor

@SrGesus SrGesus commented Oct 22, 2024

Description

Added an assert that mNodeCount is smaller than the array size.
Had to also add some kind of "aliasing" to mNodeCount because the compiler thinks it might be mutated.

 138int mNodeCount = this->mNodeCount;
 139   │     CUBOS_ASSERT(mNodeCount <= QueryNode::MaxCursorCount);
 140for (int i = 1; i < mNodeCount; ++i)
 141   │     {
 142mNodePins[i] = mNodePins[i - 1] | mNodes[i - 1]->pins();
 143   │     }

Context

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.
  • Ensure test coverage.
  • Add entry to the changelog's unreleased section.

@SrGesus SrGesus requested review from RiscadoA and a team as code owners October 22, 2024 09:22
@SrGesus SrGesus requested review from jdbaracho and RodrigoVintem and removed request for a team October 22, 2024 09:22
@SrGesus SrGesus linked an issue Oct 22, 2024 that may be closed by this pull request
Copy link
Contributor

github-actions bot commented Oct 22, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1352/
on branch gh-pages at 2024-11-17 15:20 UTC

@SrGesus SrGesus requested review from a team and jdbaracho and removed request for jdbaracho and a team October 22, 2024 09:27
Copy link
Member

@RiscadoA RiscadoA left a comment

Choose a reason for hiding this comment

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

Ty very much for chasing these bugs 🙏 LGTM other than the comment

core/src/ecs/query/filter.cpp Outdated Show resolved Hide resolved
@SrGesus SrGesus requested review from RiscadoA and removed request for RodrigoVintem and jdbaracho October 22, 2024 09:36
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.95%. Comparing base (ddb18ac) to head (e582b02).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1352   +/-   ##
=======================================
  Coverage   41.95%   41.95%           
=======================================
  Files         441      441           
  Lines       33115    33117    +2     
  Branches     3870     3870           
=======================================
+ Hits        13893    13895    +2     
  Misses      19222    19222           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SrGesus SrGesus force-pushed the 1351-o3-flag-causes-compiler-error-on-ecs-queryfilter branch from a297cef to 448078a Compare October 22, 2024 09:52
Copy link
Contributor

@diogomsmiranda diogomsmiranda left a comment

Choose a reason for hiding this comment

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

LGTM

@SrGesus SrGesus force-pushed the 1351-o3-flag-causes-compiler-error-on-ecs-queryfilter branch from 448078a to e582b02 Compare November 17, 2024 15:19
@SrGesus SrGesus requested a review from a team as a code owner November 17, 2024 15:19
@SrGesus SrGesus requested review from Dageus and RodrigoVintem and removed request for a team, Dageus and RodrigoVintem November 17, 2024 15:19
@SrGesus SrGesus merged commit 35720aa into main Nov 17, 2024
11 checks passed
@SrGesus SrGesus deleted the 1351-o3-flag-causes-compiler-error-on-ecs-queryfilter branch November 17, 2024 16:02
@SrGesus SrGesus self-assigned this Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-O3 flag causes Compiler Error on ECS QueryFilter
4 participants