Skip to content

Enum migration#141

Merged
mcarans merged 10 commits intoOoliteProject:masterfrom
MaddTheSane:enumMigration
Apr 11, 2026
Merged

Enum migration#141
mcarans merged 10 commits intoOoliteProject:masterfrom
MaddTheSane:enumMigration

Conversation

@MaddTheSane
Copy link
Copy Markdown
Contributor

These patches migrate the usage of many NSEnumeration to this project's foreach and foreachkey, which translates to for(...in...) on systems that support it.

See also #140

@mcarans
Copy link
Copy Markdown
Contributor

mcarans commented Apr 3, 2026

I suggest closing as from 2015

@oocube oocube closed this Apr 3, 2026
@mcarans mcarans reopened this Apr 10, 2026
@mcarans
Copy link
Copy Markdown
Contributor

mcarans commented Apr 10, 2026

I had another look at this and now there are tests, it may be worth looking into as it does not seem like a complicated change. Basically this needs to be brought up to date with master so we can see if the tests pass @oocube

@MaddTheSane
Copy link
Copy Markdown
Contributor Author

rebased.

@mcarans
Copy link
Copy Markdown
Contributor

mcarans commented Apr 10, 2026

@MaddTheSane It looks like there are some compile issues. Would you be able to look into those?

@MaddTheSane
Copy link
Copy Markdown
Contributor Author

I've tried to compile it using Xcode but encountered unrelated errors.

@mcarans
Copy link
Copy Markdown
Contributor

mcarans commented Apr 10, 2026

@MaddTheSane Thanks for contributing this improvement. I tested locally and it seems fine. I hope to get the Mac build working again in future probably by generating an XCode project from meson or cmake.

I added the code below to make fast enumeration the default (ie. no need for the #define and #if lines to check for it). I don't have rights to add it to your fork. Please can you add this:

0001-Always-use-fast-enumeration.patch

@MaddTheSane
Copy link
Copy Markdown
Contributor Author

Perhaps those can be a separate patch? You can also open up a pull request on my fork and branch.

@mcarans mcarans merged commit a3d0e6d into OoliteProject:master Apr 11, 2026
4 checks passed
@mcarans
Copy link
Copy Markdown
Contributor

mcarans commented Apr 11, 2026

@MaddTheSane I've merged your changes and added a separate PR for making fast enumeration the only option #598

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.

3 participants