Remove: ExpandingArray type in favour of sets, maps and vectors#65
Open
LordAro wants to merge 1 commit intoOpenTTD:masterfrom
Open
Remove: ExpandingArray type in favour of sets, maps and vectors#65LordAro wants to merge 1 commit intoOpenTTD:masterfrom
LordAro wants to merge 1 commit intoOpenTTD:masterfrom
Conversation
rubidium42
reviewed
Mar 12, 2026
Contributor
rubidium42
left a comment
There was a problem hiding this comment.
Some nitpicking things. Not really that serious. Though by me approving PR64 and it getting merged this has some merge conflicts.
| FeatData():var80(VarData(1)){} | ||
| ExpandingArray<VarData>vars; | ||
| ExpandingArray<VarData>var80; | ||
| FeatData() = default; |
Contributor
There was a problem hiding this comment.
Is defining a constructor actually needed here?
| for(uint i=0;i<(uint)m.size();i++) | ||
| ret=std::max<short>(ret,m[i].feature); | ||
| for (const auto &[_, inf] : defined2IDs._m) { | ||
| ret=std::max<short>(ret, inf.feature); |
Contributor
There was a problem hiding this comment.
Suggested change
| ret=std::max<short>(ret, inf.feature); | |
| ret = std::max<short>(ret, inf.feature); |
Comment on lines
+79
to
+99
| if(langs & 0x10) { | ||
| if(nameLocs.contains(4)) IssueMessage(WARNING2,DUPLICATE_LANG_NAME,offset,4,nameLocs[4]); | ||
| nameLocs[4] = offset; | ||
| } | ||
| if(langs&0x08) { | ||
| if(nameLocs.contains(3)) IssueMessage(WARNING2,DUPLICATE_LANG_NAME,offset,3,nameLocs[3]); | ||
| nameLocs[3] = offset; | ||
| } | ||
| if(langs&0x04) { | ||
| if(nameLocs.contains(2)) IssueMessage(WARNING2,DUPLICATE_LANG_NAME,offset,2,nameLocs[2]); | ||
| nameLocs[2] = offset; | ||
| } | ||
| if(langs&0x02) { | ||
| if(nameLocs.contains(1)) IssueMessage(WARNING2,DUPLICATE_LANG_NAME,offset,1,nameLocs[1]); | ||
| nameLocs[1] = offset; | ||
| } | ||
| if(langs&0x01) { | ||
| if(nameLocs.contains(0)) IssueMessage(WARNING2,DUPLICATE_LANG_NAME,offset,0,nameLocs[0]); | ||
| nameLocs[0] = offset; | ||
| } | ||
| } else { |
Contributor
There was a problem hiding this comment.
Spaces were added around the first &, but not the others.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built on top of #58, but probably doesn't have to be
Similarly untested beyond compilation