Browse Source

remove useless casts and fix one old style cast

master
Odilitime 5 years ago
parent
commit
e067c3e623
  1. 6
      src/graphics/components/Component.cpp

6
src/graphics/components/Component.cpp

@ -323,7 +323,7 @@ void Component::layout() { @@ -323,7 +323,7 @@ void Component::layout() {
break;
}
if (pos->height) {
std::cout << "no size, grabbing height " << (int)pos->height << std::endl;
std::cout << "no size, grabbing height " << static_cast<int>(pos->height) << std::endl;
y -= pos->height;
found = true;
break;
@ -471,7 +471,7 @@ void Component::updateParentSize() { @@ -471,7 +471,7 @@ void Component::updateParentSize() {
// flush height of previous line + our height
totalHeight += heightAccum + child->height;
heightAccum = 0; // reset
maxWidth = std::max(maxWidth, static_cast<unsigned int>(widthAccum));
maxWidth = std::max(maxWidth, widthAccum);
widthAccum = 0;
} else {
// bl bl
@ -483,7 +483,7 @@ void Component::updateParentSize() { @@ -483,7 +483,7 @@ void Component::updateParentSize() {
}
// flush any remaining width/heightAccum
totalHeight += heightAccum;
maxWidth = std::max(maxWidth, static_cast<unsigned int>(widthAccum));
maxWidth = std::max(maxWidth, widthAccum);
//std::cout << "new size " << maxWidth << "x" << totalHeight << std::endl;
// did our size actually change

Loading…
Cancel
Save