mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Fix potential uninitialized access - setupSteps depends on not yet
initialized members
This commit is contained in:
parent
20ede710c2
commit
7732f39556
@ -13,14 +13,16 @@
|
||||
|
||||
using namespace Load;
|
||||
|
||||
Progress::Progress(): _progress(std::numeric_limits<Type>::min())
|
||||
{
|
||||
setupSteps(100);
|
||||
}
|
||||
Progress::Progress()
|
||||
: Progress(100)
|
||||
{}
|
||||
|
||||
Progress::Progress(int steps): _progress(std::numeric_limits<Type>::min())
|
||||
Progress::Progress(int steps)
|
||||
: _progress(std::numeric_limits<Type>::min())
|
||||
, _target(std::numeric_limits<Type>::max())
|
||||
, _step(std::numeric_limits<Type>::min())
|
||||
, _maxSteps(steps)
|
||||
{
|
||||
setupSteps(steps);
|
||||
}
|
||||
|
||||
Type Progress::get() const
|
||||
|
Loading…
Reference in New Issue
Block a user