Skip to content

refactor(lib): Add path separator helpers to PathUtil - #3105

Draft
bobtista wants to merge 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/path-separator-helpers
Draft

refactor(lib): Add path separator helpers to PathUtil#3105
bobtista wants to merge 1 commit into
TheSuperHackers:mainfrom
bobtista:bobtista/refactor/path-separator-helpers

Conversation

@bobtista

Copy link
Copy Markdown

getExtension already had to find the last path separator and did it inline with maxPtr(strrchr(path, '/'), strrchr(path, '\\')). Several other call sites need the same thing, and some need the platform's own separator when building a path.

Now getNativePathSeparator() and getLastPathSeparator() live in PathUtil.h, with narrow and wide overloads, and getExtension uses them. No behavior change.

Todo:

  • Replicate to Generals — N/A, it's in Core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Platform Work towards platform support, such as Linux, MacOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant