FireDynamics / FireDynamics/ARTSS

Replace Struct with Enums

Open
#92 0 comments 0 reactions 0 assignees View on GitHub
effort: low good first issue priority: low type: refactoring
Dominant language
C++
Stars
14
Forks
2
PR merge metrics
No merged PRs in 30d

Description

If found multiple struct like

```c++
struct DiffusionMethods {
inline static const std::string ColoredGaussSeidel = "ColoredGaussSeidel";
inline static const std::string Jacobi = "Jacobi";
inline static const std::string Explicit = "Explicit";
};
```

in my opinion we should use enums instant.

> An enum lets you declare a series of identifiers for use in your code. The compiler replaces them with numbers for you. It's often useful for making your code more readable and maintainable, because you can use descriptive names without the performance penalty of string comparisons. It can also make the code less bug-prone because you don't have to keep writing in specific numbers everywhere, which could go wrong if a number changes.

> A struct is a data structure. At its simplest, it contains zero or more pieces of data (variables or objects), grouped together so they can be stored, processed, or passed as a single unit. You can usually have multiple copies (or instances) of it. A struct can be a lot more complex though. It's actually exactly the same as a class, except that members are public by default instead of private. Like a class, a struct can have member functions and template parameters and so on.

https://stackoverflow.com/a/20681224

found places:

- src/solver/SolverSelection.h
- src/interfaces/ISolver.h
- src/boundary/BoundaryData.cpp

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.