Add constexpr
This commit is contained in:
parent
86a0f20bca
commit
ebd1cc2f05
1 changed files with 8 additions and 8 deletions
|
|
@ -29,7 +29,7 @@ namespace character::characteristic {
|
|||
std::uint32_t materiel{ 0 };
|
||||
std::uint32_t additional{ 0 };
|
||||
|
||||
static std::uint32_t get_base(const characType inType) noexcept {
|
||||
static constexpr std::uint32_t get_base(const characType inType) noexcept {
|
||||
switch (inType) {
|
||||
case characType::Adresse:
|
||||
return 1;
|
||||
|
|
@ -44,9 +44,9 @@ namespace character::characteristic {
|
|||
public:
|
||||
const characType type{ characType::Adresse };
|
||||
|
||||
Characteristic() noexcept = default;
|
||||
constexpr Characteristic() noexcept = default;
|
||||
|
||||
Characteristic(const characType inType,
|
||||
constexpr Characteristic(const characType inType,
|
||||
const std::uint32_t carac,
|
||||
const std::uint32_t materiel,
|
||||
const std::uint32_t additional) :
|
||||
|
|
@ -56,9 +56,9 @@ namespace character::characteristic {
|
|||
additional(additional),
|
||||
type(inType) { (void) get_total(); }
|
||||
|
||||
explicit Characteristic(const characType inType) : Characteristic(inType, 0, 0, 0) {}
|
||||
constexpr explicit Characteristic(const characType inType) : Characteristic(inType, 0, 0, 0) {}
|
||||
|
||||
Characteristic(const Characteristic &charac) noexcept = default;
|
||||
constexpr Characteristic(const Characteristic &charac) noexcept = default;
|
||||
|
||||
Characteristic &operator=(const Characteristic &charac) noexcept {
|
||||
const_cast<std::uint32_t &>(base) = charac.base;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue