From: Ingo Ruhnke Date: Sun, 17 Aug 2014 01:45:15 +0000 (+0200) Subject: Removed some superfluous Vector() calls, source object is already a Vector X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=b1d0eb520d0d4dfd717a71957b100c796b243066;p=supertux.git Removed some superfluous Vector() calls, source object is already a Vector --- diff --git a/src/object/bonus_block.cpp b/src/object/bonus_block.cpp index e93ddbd4f..c2d04c674 100644 --- a/src/object/bonus_block.cpp +++ b/src/object/bonus_block.cpp @@ -474,7 +474,7 @@ BonusBlock::draw(DrawingContext& context){ Block::draw(context); // then Draw the light if on. if(sprite->get_action() == "on") { - Vector pos = get_pos() + (Vector(bbox.get_size().as_vector()) - lightsprite->get_size()) / 2; + Vector pos = get_pos() + (bbox.get_size().as_vector() - lightsprite->get_size()) / 2; context.push_target(); context.set_target(DrawingContext::LIGHTMAP); context.draw_surface(lightsprite, pos, 10); diff --git a/src/object/moving_sprite.cpp b/src/object/moving_sprite.cpp index 6f354898c..59a81ef69 100644 --- a/src/object/moving_sprite.cpp +++ b/src/object/moving_sprite.cpp @@ -127,7 +127,7 @@ MovingSprite::set_action_centered(const std::string& action, int loops) Vector old_size = bbox.get_size().as_vector(); sprite->set_action(action, loops); set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height()); - set_pos(get_pos() - (Vector(bbox.get_size().as_vector()) - old_size) / 2); + set_pos(get_pos() - (bbox.get_size().as_vector() - old_size) / 2); } void