Make progress_bar::label const

This commit is contained in:
Nikita Lisitsa 2022-05-17 21:01:20 +03:00
parent 16036268f5
commit 0f95a5bcee
2 changed files with 2 additions and 8 deletions

View file

@ -12,8 +12,7 @@ namespace psemek::ui
virtual float value() const { return value_; }
virtual void set_value(float value);
virtual struct label * label();
virtual struct label const * label() const;
virtual struct label * label() const;
private:
float value_ = 0.f;

View file

@ -10,14 +10,9 @@ namespace psemek::ui
value_ = geom::clamp(value, {0.f, 1.f});
}
label * progress_bar::label()
label * progress_bar::label() const
{
return dynamic_cast<struct label *>(child().get());
}
label const * progress_bar::label() const
{
return dynamic_cast<struct label const *>(child().get());
}
}