mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 15:01:42 +00:00
Simplified the code.
This commit is contained in:
parent
a1a62c2c9c
commit
90e792b6f8
@ -201,12 +201,7 @@ void tod_manager::replace_schedule(const config& time_cfg)
|
||||
|
||||
void tod_manager::replace_schedule(const std::vector<time_of_day>& schedule)
|
||||
{
|
||||
times_.clear();
|
||||
BOOST_FOREACH(const time_of_day& time, schedule) {
|
||||
config cfg;
|
||||
time.write(cfg);
|
||||
times_.push_back(time_of_day(cfg));
|
||||
}
|
||||
times_ = schedule;
|
||||
currentTime_ = 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user