Skip to content

Commit

Permalink
valid default methdos
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke committed Mar 22, 2024
1 parent 43063b6 commit ebbc785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ class Resource {
virtual void Absorb(Ptr res) { throw Error("cannot absorb resource type " + this->type()); };

/// Returns the package id.
virtual int package_id() = 0;
virtual int package_id() { return default_package_id_; };

/// Changes the product's package id
virtual void ChangePackageId(int new_package_id) = 0;
virtual void ChangePackageId(int new_package_id) {};

protected:
const static int default_package_id_ = 1;
Expand Down

0 comments on commit ebbc785

Please sign in to comment.