@@ -334,25 +334,19 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
334334 if (w > 0 ) {
335335 if (makeColumnsEqualWidth ) {
336336 float equalWidth = (w + spanWidth ) / hSpan ;
337- float remainder = (w + spanWidth ) % hSpan ;
338- int last = -1 ;
339337 for (int k = 0 ; k < hSpan ; k ++) {
340- widths [last = j -k ] = Math .max (equalWidth , widths [j -k ]);
338+ widths [j -k ] = Math .max (equalWidth , widths [j -k ]);
341339 }
342- if (last > -1 ) widths [last ] += remainder ;
343340 } else {
344341 if (spanExpandCount == 0 ) {
345342 widths [j ] += w ;
346343 } else {
347344 float delta = w / spanExpandCount ;
348- float remainder = w % spanExpandCount ;
349- int last = -1 ;
350345 for (int k = 0 ; k < hSpan ; k ++) {
351346 if (expandColumn [j -k ]) {
352- widths [last = j -k ] += delta ;
347+ widths [j -k ] += delta ;
353348 }
354349 }
355- if (last > -1 ) widths [last ] += remainder ;
356350 }
357351 }
358352 }
@@ -364,14 +358,11 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
364358 minWidths [j ] += w ;
365359 } else {
366360 float delta = w / spanExpandCount ;
367- float remainder = w % spanExpandCount ;
368- int last = -1 ;
369361 for (int k = 0 ; k < hSpan ; k ++) {
370362 if (expandColumn [j -k ]) {
371- minWidths [last = j -k ] += delta ;
363+ minWidths [j -k ] += delta ;
372364 }
373365 }
374- if (last > -1 ) minWidths [last ] += remainder ;
375366 }
376367 }
377368 }
@@ -434,14 +425,11 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
434425 widths [j ] += w ;
435426 } else {
436427 float delta2 = w / spanExpandCount ;
437- float remainder2 = w % spanExpandCount ;
438- int last2 = -1 ;
439428 for (int k = 0 ; k < hSpan ; k ++) {
440429 if (expandColumn [j -k ]) {
441- widths [last2 = j -k ] += delta2 ;
430+ widths [j -k ] += delta2 ;
442431 }
443432 }
444- if (last2 > -1 ) widths [last2 ] += remainder2 ;
445433 }
446434 }
447435 }
@@ -547,14 +535,11 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
547535 heights [i ] += h ;
548536 } else {
549537 float delta = h / spanExpandCount ;
550- float remainder = h % spanExpandCount ;
551- int last = -1 ;
552538 for (int k = 0 ; k < vSpan ; k ++) {
553539 if (expandRow [i -k ]) {
554- heights [last = i -k ] += delta ;
540+ heights [i -k ] += delta ;
555541 }
556542 }
557- if (last > -1 ) heights [last ] += remainder ;
558543 }
559544 }
560545 if (!data .grabExcessVerticalSpace || data .minimumHeight != 0 ) {
@@ -565,14 +550,11 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
565550 minHeights [i ] += h ;
566551 } else {
567552 float delta = h / spanExpandCount ;
568- float remainder = h % spanExpandCount ;
569- int last = -1 ;
570553 for (int k = 0 ; k < vSpan ; k ++) {
571554 if (expandRow [i -k ]) {
572- minHeights [last = i -k ] += delta ;
555+ minHeights [i -k ] += delta ;
573556 }
574557 }
575- if (last > -1 ) minHeights [last ] += remainder ;
576558 }
577559 }
578560 }
@@ -622,14 +604,11 @@ Point layout (Composite composite, boolean move, int x, int y, int width, int he
622604 heights [i ] += h ;
623605 } else {
624606 float delta2 = h / spanExpandCount ;
625- float remainder2 = h % spanExpandCount ;
626- int last2 = -1 ;
627607 for (int k = 0 ; k < vSpan ; k ++) {
628608 if (expandRow [i -k ]) {
629- heights [last2 = i -k ] += delta2 ;
609+ heights [i -k ] += delta2 ;
630610 }
631611 }
632- if (last2 > -1 ) heights [last2 ] += remainder2 ;
633612 }
634613 }
635614 }
0 commit comments