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

game: entity: collider: collider-qtree: исправление сборки с GCC 13 #1

Closed
wants to merge 1 commit into from

Conversation

a1batross
Copy link

При сборке GCC выдаёт такую ошибку:

src/game/entity/collider/collider-qtree.hpp:31:31: error: 'static std::size_t Collider_qtree::Collision_pairs_hash::operator()(Collider_qtree::Collision_pair)' must be a non-static member function
   31 |     inline static std::size_t operator()(const Collision_pair val) {

Однако просто убрать static с operator метода нельзя, тогда появляется ошибка в robin_hood.h:

thirdparty/include/robin-hood-hashing/robin_hood.h:1352:57: error: passing 'const robin_hood::detail::Table<true, 80, std::pair<Entity*, Entity*>, void, Collider_qtree::Collision_pairs_hash, std::equal_to<std::pair<Entity*, Entity*> > >' as 'this' argument discards qualifiers [-fpermissive]
 1352 |         auto h = static_cast<uint64_t>(WHash::operator()(key));

Поэтому с одной стороны удалён static, а с другой добавлен const.

При сборке GCC выдаёт такую ошибку: 
```
src/game/entity/collider/collider-qtree.hpp:31:31: error: 'static std::size_t Collider_qtree::Collision_pairs_hash::operator()(Collider_qtree::Collision_pair)' must be a non-static member function
   31 |     inline static std::size_t operator()(const Collision_pair val) {
```

Однако просто убрать static с operator метода нельзя, тогда появляется ошибка в robin_hood.h:
```
thirdparty/include/robin-hood-hashing/robin_hood.h:1352:57: error: passing 'const robin_hood::detail::Table<true, 80, std::pair<Entity*, Entity*>, void, Collider_qtree::Collision_pairs_hash, std::equal_to<std::pair<Entity*, Entity*> > >' as 'this' argument discards qualifiers [-fpermissive]
 1352 |         auto h = static_cast<uint64_t>(WHash::operator()(key));
```

Поэтому с одной стороны удалён static, а с другой добавлен const.
@a1batross
Copy link
Author

Отбой. Вместо GCC 13 подтянулся GCC 11.

@a1batross a1batross closed this Apr 9, 2024
@a1batross a1batross deleted the patch-1 branch April 9, 2024 10:09
@a1batross
Copy link
Author

С GCC 13 всё в порядке :)

@HPW-dev
Copy link
Owner

HPW-dev commented Apr 17, 2024

ок, лол

@HPW-dev
Copy link
Owner

HPW-dev commented Apr 21, 2024

Кста, это первый пул реквест

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants