Skip to content

Commit

Permalink
Removed some superfluous Vector() calls, source object is already a V…
Browse files Browse the repository at this point in the history
…ector
  • Loading branch information
Grumbel committed Aug 17, 2014
1 parent b6c8f72 commit b1d0eb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/object/bonus_block.cpp
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/object/moving_sprite.cpp
Expand Up @@ -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
Expand Down

0 comments on commit b1d0eb5

Please sign in to comment.