Browse Source

Move OptionEntry::operator*() to header

pull/3638/head
obligaron 4 years ago committed by Gleb Mazovetskiy
parent
commit
16253cafad
  1. 8
      Source/options.cpp
  2. 10
      Source/options.h

8
Source/options.cpp

@ -482,10 +482,6 @@ void OptionEntryBoolean::SaveToIni(string_view category) const
{
SetIniValue(category.data(), key.data(), value);
}
bool OptionEntryBoolean::operator*() const
{
return value;
}
void OptionEntryBoolean::SetValue(bool value)
{
this->value = value;
@ -517,10 +513,6 @@ void OptionEntryEnumBase::SaveToIni(string_view category) const
{
SetIniValue(category.data(), key.data(), value);
}
int OptionEntryEnumBase::GetValueInternal() const
{
return value;
}
void OptionEntryEnumBase::AddEntry(int value, string_view name)
{
entryValues.push_back(value);

10
Source/options.h

@ -82,7 +82,10 @@ public:
, value(defaultValue)
{
}
[[nodiscard]] bool operator*() const;
[[nodiscard]] bool operator*() const
{
return value;
}
void SetValue(bool value);
[[nodiscard]] OptionEntryType GetType() const override;
@ -130,7 +133,10 @@ protected:
{
}
[[nodiscard]] int GetValueInternal() const;
[[nodiscard]] int GetValueInternal() const
{
return value;
}
void AddEntry(int value, string_view name);

Loading…
Cancel
Save