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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1352/
on branch gh-pages at 2024-10-22 09:23 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.54%. Comparing base (86781d5) to head (448078a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1352   +/-   ##
=======================================
  Coverage   41.54%   41.54%           
=======================================
  Files         437      437           
  Lines       32850    32852    +2     
  Branches     3820     3820           
=======================================
+ Hits        13646    13647    +1     
- Misses      19204    19205    +1     

☔ 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
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
3 participants