diff options
author | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-06 11:37:00 -0300 |
---|---|---|
committer | Thales Lima Oliveira <thaleslima.ufu@gmail.com> | 2020-06-06 11:37:00 -0300 |
commit | c5636d2031b20e673441e095d90ba94942698e7c (patch) | |
tree | 30b9f15cd5d91fe11a07960154d03afc2328bf8a /Project/Workspace.h | |
parent | 0586ac0d34e4d8d5dd9845f2fdd212716b3004f9 (diff) | |
download | PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.tar.gz PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.tar.xz PSP.git-c5636d2031b20e673441e095d90ba94942698e7c.zip |
Some class enum implementation
Just for better code design: https://docs.microsoft.com/pt-br/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/enumeration-classes-over-enum-types
Diffstat (limited to 'Project/Workspace.h')
-rw-r--r-- | Project/Workspace.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Project/Workspace.h b/Project/Workspace.h index b397db9..deac1e4 100644 --- a/Project/Workspace.h +++ b/Project/Workspace.h @@ -20,7 +20,7 @@ #ifdef _MSC_VER #include <windows.h> -#endif +#endif // _MSC_VER #include <GL/gl.h> #include <GL/glu.h> @@ -90,7 +90,7 @@ enum ElementID { class Workspace : public WorkspaceBase { public: - enum WorkspaceMode { + enum class WorkspaceMode : int { MODE_EDIT = 0, MODE_MOVE_ELEMENT, MODE_MOVE_PICKBOX, @@ -182,7 +182,7 @@ protected: wxTipWindow* m_tipWindow = NULL; wxString m_name; - WorkspaceMode m_mode = MODE_EDIT; + WorkspaceMode m_mode = WorkspaceMode::MODE_EDIT; std::vector<PowerElement*> m_elementList; int m_elementNumber[NUM_ELEMENTS]; |