From c814015f311a881d8cee4a405f97f1cb32f410f9 Mon Sep 17 00:00:00 2001 From: Sebastian Held Date: Mon, 19 Apr 2010 16:08:32 +0200 Subject: [PATCH] make it const --- FDTD/operator.cpp | 4 ++-- FDTD/operator.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 641ef53..8314cb6 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -102,14 +102,14 @@ unsigned int Operator::CalcNyquistNum(double fmax) return floor(T0/2/dT); } -double Operator::GetMeshDelta(int n, unsigned int* pos, bool dualMesh) const +double Operator::GetMeshDelta(int n, const unsigned int* pos, bool dualMesh) const { if ((n<0) || (n>2)) return 0.0; int i_pos[] = {pos[0],pos[1],pos[2]}; return GetMeshDelta(n,i_pos,dualMesh); } -double Operator::GetMeshDelta(int n, int* pos, bool dualMesh) const +double Operator::GetMeshDelta(int n, const int* pos, bool dualMesh) const { if ((n<0) || (n>2)) return 0.0; if (dualMesh==false) diff --git a/FDTD/operator.h b/FDTD/operator.h index c4fd927..ee1a9b4 100644 --- a/FDTD/operator.h +++ b/FDTD/operator.h @@ -69,8 +69,8 @@ public: virtual double GetGridDelta() const {return gridDelta;} //! Get the mesh delta times the grid delta for a 3D position - virtual double GetMeshDelta(int n, int* pos, bool dualMesh=false) const; - virtual double GetMeshDelta(int n, unsigned int* pos, bool dualMesh=false) const; + virtual double GetMeshDelta(int n, const int* pos, bool dualMesh=false) const; + virtual double GetMeshDelta(int n, const unsigned int* pos, bool dualMesh=false) const; //! Get the disc line in n direction virtual double GetDiscLine(int n, int pos, bool dualMesh=false) const;