Skip to content

Set scope of enum values to enum class #53

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Set scope of enum values to enum class #53

merged 1 commit into from
Apr 24, 2025

Conversation

sebromero
Copy link
Contributor

Fixes #52. It does so by confining the scope of the enum values to the enum class. This would only break compatibility for boards using old toolchains, namely AVR boards which are not supported by this library anyway. I can't think of any side effects.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Apr 17, 2025
@sebromero sebromero requested a review from Copilot April 24, 2025 12:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR confines the scope of enum values by converting the unscoped enum to a scoped enum class.

  • Updated UFile.cpp to reference enum values using FileMode::VALUE.
  • Modified Types.h to declare FileMode as an enum class.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/UFile.cpp Updated enum value usage to use scoped enum class syntax
src/Types.h Converted enum FileMode to enum class for better scoping

@sebromero sebromero merged commit a0988e8 into main Apr 24, 2025
6 of 12 checks passed
@sebromero sebromero deleted the enum-fix branch April 24, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name collision with ArduinoIoTCloud library
2 participants