X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fobject%2Fanchor_point.cpp;h=4c42edb06a46d17f6b584fa8781e76527f4eca32;hb=a113d3bd1feddd510e3b2852b0d42522735eee40;hp=110fb4290a68d1598b0b1b08de35afd91382c86b;hpb=ff4c6994b952e26b854461d739eb3bcbfc30719f;p=supertux.git diff --git a/src/object/anchor_point.cpp b/src/object/anchor_point.cpp index 110fb4290..4c42edb06 100644 --- a/src/object/anchor_point.cpp +++ b/src/object/anchor_point.cpp @@ -71,7 +71,7 @@ AnchorPoint string_to_anchor_point(const std::string& str) return ANCHOR_BOTTOM; else if(str == "bottomright") return ANCHOR_BOTTOM_RIGHT; - + std::ostringstream msg; msg << "Unknown anchor '" << str << "'"; throw std::runtime_error(msg.str()); @@ -80,7 +80,7 @@ AnchorPoint string_to_anchor_point(const std::string& str) Vector get_anchor_pos(const Rect& rect, AnchorPoint point) { Vector result; - + switch(point & ANCHOR_V_MASK) { case ANCHOR_LEFT: result.x = rect.get_left(); @@ -118,7 +118,7 @@ Vector get_anchor_pos(const Rect& rect, AnchorPoint point) result.y = rect.get_top(); break; } - + return result; } @@ -126,7 +126,7 @@ Vector get_anchor_pos(const Rect& destrect, float width, float height, AnchorPoint point) { Vector result; - + switch(point & ANCHOR_V_MASK) { case ANCHOR_LEFT: result.x = destrect.get_left(); @@ -164,7 +164,6 @@ Vector get_anchor_pos(const Rect& destrect, float width, float height, result.y = destrect.get_top(); break; } - - return result; -} + return result; +}