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
Codechange: Remove last FOR_XXX macros #9368
Conversation
|
||
private: | ||
Tbitset bitset; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, I have not enough knowledge to rate this part of the PR in any way :D @LordAro , mind giving this a look? Tnx!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dunno much either. Part of me wonders whether std::bitset might be useable somehow (though may well require a fair bit more refactoring to do so)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though bitset doesn't have iterators (or rather begin/end), so can it iterate over them? With my naive check you can't, and I think that was the whole point of making this iterator.
|
||
private: | ||
Tbitset bitset; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though bitset doesn't have iterators (or rather begin/end), so can it iterate over them? With my naive check you can't, and I think that was the whole point of making this iterator.
src/core/bitmath_func.hpp
Outdated
* @tparam Tbitset Type of the bitset value. | ||
*/ | ||
template <typename Tbitpos = uint, typename Tbitset = uint> | ||
struct BitIterator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the class does not imply that it only considers set bits, nor that it actually returns the position and not be bit value.
I have no more comments. @rubidium42 : this okay with you too? PS: really cool finally these really old macros are goneeeeeeee. Nice job @glx22 :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to assume the silence is a yes :)
Motivation / Problem
I finally finished removing
FOR_XXX
macros.(Now Intellisense is more usable)
Description
HeightMap::h
with a vector_sorted_cargo_specs
sub-range of standardCargoSpec
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.