mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
Use a std::list instead of a std::vector for timers list.
This commit is contained in:
parent
9e9f88b7b7
commit
5529c62c9f
@ -14,11 +14,11 @@
|
||||
#include "ui/widget.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
namespace ui {
|
||||
|
||||
typedef std::vector<Timer*> Timers;
|
||||
typedef std::list<Timer*> Timers;
|
||||
|
||||
static Timers timers; // Registered timers
|
||||
|
||||
@ -80,8 +80,8 @@ void Timer::pollTimers()
|
||||
int t = ji_clock;
|
||||
int count;
|
||||
|
||||
for (int c=0; c<(int)timers.size(); ++c) {
|
||||
Timer* timer = timers[c];
|
||||
for (Timers::iterator it=timers.begin(), end=timers.end(); it != end; ++it) {
|
||||
Timer* timer = *it;
|
||||
if (timer && timer->m_lastTime >= 0) {
|
||||
count = 0;
|
||||
while (t - timer->m_lastTime > timer->m_interval) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user