fix warnings about signed/unsigned comparison

This commit is contained in:
Andrew Meadows 2014-03-04 11:54:58 -08:00
parent 16a5af1a8e
commit 2faaa5beef

View file

@ -129,7 +129,7 @@ void BandwidthMeter::render(int screenWidth, int screenHeight) {
// Determine total
float totalIn = 0.0f, totalOut = 0.0f;
for (int i = 0; i < N_CHANNELS; ++i) {
for (size_t i = 0; i < N_CHANNELS; ++i) {
totalIn += inputStream(ChannelIndex(i)).getValue();
totalOut += outputStream(ChannelIndex(i)).getValue();
@ -205,7 +205,7 @@ void BandwidthMeter::render(int screenWidth, int screenHeight) {
// Render bars
int xIn = 0, xOut = 0;
for (int i = 0; i < N_CHANNELS; ++i) {
for (size_t i = 0; i < N_CHANNELS; ++i) {
ChannelIndex chIdx = ChannelIndex(i);
int wIn = int(barWidth * inputStream(chIdx).getValue() * UNIT_SCALE / scaleMax);
@ -240,7 +240,7 @@ void BandwidthMeter::render(int screenWidth, int screenHeight) {
// After rendering, indicate that no data has been sent/received since the last feed.
// This way, the meters fall when not continuously fed.
for (int i = 0; i < N_CHANNELS; ++i) {
for (size_t i = 0; i < N_CHANNELS; ++i) {
inputStream(ChannelIndex(i)).updateValue(0);
outputStream(ChannelIndex(i)).updateValue(0);
}