mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 00:00:44 +01:00
Coverity: fix unitialized pointer fields, out of bounds reads ...
Change-Id: Iae0656ffe667692dfb3bebf9bb7913b5872175c6
This commit is contained in:
committed by
EmilieNumworks
parent
c545a23ec6
commit
15610064fa
@@ -73,7 +73,7 @@ void ButtonRowController::ContentView::layoutSubviews() {
|
||||
Button * button = buttonAtIndex(i);
|
||||
totalButtonWidth += button->minimalSizeForOptimalDisplay().width();
|
||||
}
|
||||
widthMargin = std::round((float)((bounds().width() - totalButtonWidth)/(nbOfButtons+1)));
|
||||
widthMargin = std::round(((float)(bounds().width() - totalButtonWidth))/((float)(nbOfButtons+1)));
|
||||
buttonHeightMargin = m_size == Size::Small ? k_embossedStyleHeightMarginSmall : k_embossedStyleHeightMarginLarge;
|
||||
buttonHeight = rowHeight- 2*buttonHeightMargin;
|
||||
}
|
||||
@@ -121,7 +121,7 @@ void ButtonRowController::ContentView::drawRect(KDContext * ctx, KDRect rect) co
|
||||
Button * button = buttonAtIndex(i);
|
||||
totalButtonWidth += button->minimalSizeForOptimalDisplay().width();
|
||||
}
|
||||
KDCoordinate widthMargin = std::round((float)((bounds().width() - totalButtonWidth)/(numberOfButtons()+1)));
|
||||
KDCoordinate widthMargin = std::round(((float)(bounds().width() - totalButtonWidth))/((float)(numberOfButtons()+1)));
|
||||
|
||||
int currentXOrigin = widthMargin-1;
|
||||
for (int i = 0; i < numberOfButtons(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user