Commit 34725508 authored by Hanspeter Portner's avatar Hanspeter Portner

Squashed 'xpress.lv2/' changes from 24011092..fa3e5dc5

fa3e5dc5 migrate from square to linear probing.

git-subtree-dir: xpress.lv2
git-subtree-split: fa3e5dc58ad84b436a153a64df5d63d829fff2f0
parent 24c2daef
......@@ -277,9 +277,9 @@ _xpress_urn_uuid(LV2_URID_Map *map)
static inline xpress_voice_t *
_xpress_voice_get(xpress_t *xpress, xpress_uuid_t uuid)
{
for(unsigned i = 0, idx = (uuid + i*i) & xpress->mask_nvoices;
for(unsigned i = 0, idx = (uuid + i) & xpress->mask_nvoices;
i < xpress->max_nvoices;
i++, idx = (uuid + i*i) & xpress->mask_nvoices)
i++, idx = (uuid + i) & xpress->mask_nvoices)
{
xpress_voice_t *voice = &xpress->voices[idx];
......@@ -295,9 +295,9 @@ _xpress_voice_get(xpress_t *xpress, xpress_uuid_t uuid)
static inline void *
_xpress_voice_add(xpress_t *xpress, LV2_URID source, xpress_uuid_t uuid, bool alive)
{
for(unsigned i = 0, idx = (uuid + i*i) & xpress->mask_nvoices;
for(unsigned i = 0, idx = (uuid + i) & xpress->mask_nvoices;
i < xpress->max_nvoices;
i++, idx = (uuid + i*i) & xpress->mask_nvoices)
i++, idx = (uuid + i) & xpress->mask_nvoices)
{
xpress_voice_t *voice = &xpress->voices[idx];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment