MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / updateCache

Method updateCache

Source/MIDI/CtrlrMidiInputComparatorSingle.cpp:186–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186void CtrlrMidiInputComparatorSingle::updateCache (const CtrlrMidiMessageType t, CtrlrMidiMapIterator &it)
187{
188 CtrlrCacheDataSingle c((*it).first, (*it).second);
189 Array<CtrlrCacheDataSingle> &cache = getCache(t);
190
191 if (cache.contains (c))
192 {
193 if (cache.indexOf (c) == 0)
194 return;
195 else
196 {
197 cache.swap (cache.indexOf(c), 0);
198 }
199 }
200 else
201 {
202 cache.insert (0, c);
203 cache.resize (cacheSize);
204 }
205}
206
207void CtrlrMidiInputComparatorSingle::updateCacheSysEx (CtrlrMultiMidiMapIterator &it)
208{

Callers

nothing calls this directly

Calls 5

containsMethod · 0.45
indexOfMethod · 0.45
swapMethod · 0.45
insertMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected