diff options
author | nyamatongwe <nyamatongwe@gmail.com> | 2011-11-14 14:27:34 +1100 |
---|---|---|
committer | nyamatongwe <nyamatongwe@gmail.com> | 2011-11-14 14:27:34 +1100 |
commit | 52d78d9ce53d95a159ddfa7952b84bf754dc6054 (patch) | |
tree | 3f46769a6ae3a46e546666c9ac01ab1d94828e63 | |
parent | 82a36e852d6c45850f07d69aa87486851e53237c (diff) | |
download | scintilla-mirror-52d78d9ce53d95a159ddfa7952b84bf754dc6054.tar.gz |
Use fields to hold NSTimer pointers to avoid warnings from Analyze.
Does not change behaviour.
-rw-r--r-- | cocoa/ScintillaCocoa.h | 3 | ||||
-rw-r--r-- | cocoa/ScintillaCocoa.mm | 21 |
2 files changed, 13 insertions, 11 deletions
diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index 58cc66b88..5ee1f149f 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -116,6 +116,9 @@ private: int scrollSpeed; int scrollTicks; + NSTimer* tickTimer; + NSTimer* idleTimer; + protected: PRectangle GetClientRectangle(); Point ConvertPoint(NSPoint point); diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index ccaa384f7..e7beda69b 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -583,12 +583,11 @@ void ScintillaCocoa::SetTicking(bool on) if (timer.ticking) { // Scintilla ticks = milliseconds - // Using userInfo as flag to distinct between tick and idle timer. - NSTimer* tickTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0 - target: timerTarget - selector: @selector(timerFired:) - userInfo: nil - repeats: YES]; + tickTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0 + target: timerTarget + selector: @selector(timerFired:) + userInfo: nil + repeats: YES]; timer.tickerID = reinterpret_cast<TickerID>(tickTimer); } else @@ -611,11 +610,11 @@ bool ScintillaCocoa::SetIdle(bool on) if (idler.state) { // Scintilla ticks = milliseconds - NSTimer* idleTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0 - target: timerTarget - selector: @selector(idleTimerFired:) - userInfo: nil - repeats: YES]; + idleTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0 + target: timerTarget + selector: @selector(idleTimerFired:) + userInfo: nil + repeats: YES]; idler.idlerID = reinterpret_cast<IdlerID>(idleTimer); } else |