How about start using c++11 loops? I.e.:

```c++
for (uint8_t x : icluster->amplitudes())
  cluster_signal += x;
```

see also:

http://www.cprogramming.com/c++11/c++11-ranged-for-loop.html