diff --git a/ex4.2/CaloCell.cc b/ex4.2/CaloCell.cc deleted file mode 100644 index b4e4f57..0000000 --- a/ex4.2/CaloCell.cc +++ /dev/null @@ -1,18 +0,0 @@ -//CaloGrid.cc -#include -#include "CaloGrid.hh" - -CaloCell* CaloGrid::cell(int x, int y ) { - if ( x > nx or x < 0 ) { - std::cout << "CaloGrid::cell() Error: out of grid (x)" << std::endl ; - return nullptr; - } - - if ( y > ny or y < 0 ) { - std::cout << "CaloGrid::cell() Error: out of grid (y)" << std::endl ; - return nullptr; - } - - return cells[ x*nx + y ] ; -} - diff --git a/ex4.2/CaloCell.hh b/ex4.2/CaloCell.hh index 30a396d..b26c3c4 100644 --- a/ex4.2/CaloCell.hh +++ b/ex4.2/CaloCell.hh @@ -13,10 +13,10 @@ class CaloCell // No need for Constructor or Destructor double getEnergy() const { return energy; } - bool setEnergy( double new_energy ) { return (energy = new_energy) ; } + void setEnergy( double new_energy ) { energy = new_energy ; } int getId() const { return ID ; } - bool setId( int new_id ) { return ( ID = new_id ) ; } + void setId( int new_id ) { ID = new_id ; } private: