GIFTranslator: style fixes

This commit is contained in:
John Scipione
2014-03-06 16:38:41 -05:00
parent ead17dec08
commit 33ef87cd9e
2 changed files with 8 additions and 3 deletions
+4 -1
View File
@@ -351,12 +351,15 @@ GIFSave::ResetHashtable()
int
GIFSave::CheckHashtable(int s, unsigned char c)
{
if (s == -1) return c;
if (s == -1)
return c;
int hashindex = HASH(s, c);
int nextindex;
while ((nextindex = code_value[hashindex]) != -1) {
if (prefix_code[nextindex] == s && append_char[nextindex] == c)
return nextindex;
hashindex = (hashindex + HASHSTEP) % HASHSIZE;
}
+4 -2
View File
@@ -400,7 +400,7 @@ GIFView::MessageReceived(BMessage* message)
}
case GV_TRANSPARENT_RED:
{
{
int32 value = CheckInput(fTransparentRedTC);
fSettings->SetGetInt32(GIF_SETTING_TRANSPARENT_RED, &value);
break;
@@ -428,7 +428,9 @@ GIFView::MessageReceived(BMessage* message)
}
int GIFView::CheckInput(BTextControl* control) {
int
GIFView::CheckInput(BTextControl* control)
{
int value = atoi(control->Text());
if (value < 0 || value > 255) {
value = (value < 0) ? 0 : 255;