Skip to content

Commit

Permalink
Move some code into source file from header file.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Sep 30, 2024
1 parent d211377 commit 3e1047b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Drawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ Drawable::Drawable(Point point) : point_(point) {}

Drawable::~Drawable() = default;

int Drawable::getX() const { return point_.x_; }
void Drawable::setX(int x) { point_.x_ = x; }

int Drawable::getY() const { return point_.y_; }
void Drawable::setY(int y) { point_.y_ = y; }

void Drawable::setLocation(Point point) { point_ = point; }
Expand Down
6 changes: 3 additions & 3 deletions src/Drawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ class Drawable
virtual ResourceType getResourceType() const = 0;
virtual Point getCenter() const = 0;

int getX() const;
void setX(int x);
void setY(int y);

int getX() const { return point_.x_; }
int getY() const { return point_.y_; }
int getY() const;
void setY(int y);

void setLocation(Point point);
Point getLocation() const;
Expand Down

0 comments on commit 3e1047b

Please sign in to comment.