Fix all the missing return statements and guard against this happening again

This commit is contained in:
2014-04-15 03:12:47 -04:00
parent 2b924101d6
commit 2d69851746
11 changed files with 34 additions and 5 deletions

View File

@@ -877,6 +877,9 @@ public:
case 3:
return sf::Vector2f(r*sin(t), h + r*cos(t));
}
// Unreachable
printf("Whoops, rounded rectangle had bad point!");
return sf::Vector2f();
}
// TODO: Additional functions?
@@ -1017,6 +1020,7 @@ Region& Region::operator-=(Region& other) {
else shape->setFillColor(sf::Color::Black);
shapes.push_back(shape);
}
return *this;
}
void tileImage(sf::RenderTarget& target, RECT area, sf::Texture& img, sf::BlendMode mode){