Icon-O-Matic: Remove some dead code.

This caused -Wformat-overflow (but only if -ftree-vrp was enabled,
which at present we disable it universally.)
This commit is contained in:
Augustin Cavalier
2018-05-28 20:45:48 -04:00
parent 9e75e900da
commit 1011a95a7c
@@ -256,47 +256,39 @@ ColorPickerView::MessageReceived(BMessage *message)
int nr = message->what - MSG_TEXTCONTROL;
int value = atoi(fTextControl[nr]->Text());
char string[4];
switch (nr) {
case 0: {
value %= 360;
sprintf(string, "%d", value);
h = (float)value / 60;
} break;
case 1: {
value = min_c(value, 100);
sprintf(string, "%d", value);
s = (float)value / 100;
} break;
case 2: {
value = min_c(value, 100);
sprintf(string, "%d", value);
v = (float)value / 100;
} break;
case 3: {
value = min_c(value, 255);
sprintf(string, "%d", value);
r = (float)value / 255;
} break;
case 4: {
value = min_c(value, 255);
sprintf(string, "%d", value);
g = (float)value / 255;
} break;
case 5: {
value = min_c(value, 255);
sprintf(string, "%d", value);
b = (float)value / 255;
} break;
}
if (nr<3) { // hsv-mode
if (nr < 3) { // hsv-mode
HSV_to_RGB(h, s, v, r, g, b);
}