openlayers/ol3 — pull request #1730 by elemoine (2014-02-20 10:34:36+00:00)
Title: Fix handling of the color cache

When the size of the color cache exceeds the limit we're supposed to delete a 25% of the entries. Currently this does not work – the cache keeps growing.

This is because `(i++ & 3 === 0)` always evaluates to 0 (which is a falsy value). This expression always evaluates to 0 because the `===` operator has precedence over the `&` operator.

This PR fixes the bug by using brackets around the `i++ & 3` expression.