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

MusicDataBaseDirectory::NODE_TYPE: convert to enum class #26027

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

notspiff
Copy link
Contributor

Description

Rename and change an enum to an enum class

Motivation and context

More modern, more type safe, ..

How has this been tested?

It builds

What is the effect on users?

None

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • Student submission (PR was done for educational purposes and will be treated as such)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • [] My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@notspiff notspiff added Type: Improvement non-breaking change which improves existing functionality v22 Piers labels Nov 30, 2024
@notspiff notspiff added this to the Piers 22.0 Alpha 1 milestone Nov 30, 2024
@notspiff notspiff requested a review from DaveTBlake as a code owner November 30, 2024 16:13
@notspiff notspiff force-pushed the musicdb_nodetype_enum_class branch from 5dd18b2 to 7691d0f Compare November 30, 2024 17:14
Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DirectoryNode.h is included in many header files. Any chance to replace some of the includes with forward declarations to the new enum class now?

Quick check:

  • filesystem/MusicdatabaseDirectory/QueryParams.h
  • filesystem/VideodatabaseDirectory/QueryParams.h
  • filesystem/MusicDatabaseDirectory.h
  • filesystem/VideoDatabaseDirectory.h

xbmc/filesystem/MusicDatabaseDirectory.cpp Outdated Show resolved Hide resolved
@notspiff notspiff force-pushed the musicdb_nodetype_enum_class branch from 7691d0f to ae59e38 Compare December 2, 2024 15:35
@notspiff
Copy link
Contributor Author

notspiff commented Dec 2, 2024

added another commit with the forwards. the video ones will have to wait until the PR that changes the video enum (next in my queue..)

and rename NodeType to follow conventions
@notspiff notspiff force-pushed the musicdb_nodetype_enum_class branch from ae59e38 to f9f64b6 Compare December 2, 2024 16:15
@notspiff notspiff force-pushed the musicdb_nodetype_enum_class branch from f9f64b6 to 65de957 Compare December 2, 2024 17:13
@notspiff
Copy link
Contributor Author

notspiff commented Dec 3, 2024

good to go?

Copy link
Member

@garbear garbear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@ksooo ksooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shove it in.

@notspiff notspiff merged commit 0cbcd6b into xbmc:master Dec 4, 2024
2 checks passed
@notspiff notspiff deleted the musicdb_nodetype_enum_class branch December 4, 2024 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement non-breaking change which improves existing functionality v22 Piers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants