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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "Boards.h"

enum FileMode { READ, WRITE, APPEND };
enum class FileMode { READ, WRITE, APPEND };

#if defined(USES_RENESAS_CORE)
#include "BlockDevice.h"
Expand Down
6 changes: 3 additions & 3 deletions src/UFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ bool UFile::open(const char* filename, FileMode fileMode) {
path = filename;
// Set the mode based on the fileMode
switch (fileMode) {
case READ:
case FileMode::READ:
mode = "r+";
break;
case WRITE:
case FileMode::WRITE:
mode = "w+";
break;
case APPEND:
case FileMode::APPEND:
mode = "a+";
break;
default:
Expand Down
Loading