[cig-commits] r13146 - cs/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Oct 29 15:10:46 PDT 2008


Author: luis
Date: 2008-10-29 15:10:46 -0700 (Wed, 29 Oct 2008)
New Revision: 13146

Modified:
   cs/cigma/trunk/src/fn_zero.h
Log:
Declare ZeroFunction::n_{dim,rank} as const functions

Note that the dimension and rank are stored in variables,
instead of template parameters, because we'd like to use
this function against any other arbitrary function.

Modified: cs/cigma/trunk/src/fn_zero.h
===================================================================
--- cs/cigma/trunk/src/fn_zero.h	2008-10-29 21:55:56 UTC (rev 13145)
+++ cs/cigma/trunk/src/fn_zero.h	2008-10-29 22:10:46 UTC (rev 13146)
@@ -16,8 +16,8 @@
 
     void setShape(int dim, int rank);
 
-    int n_dim();
-    int n_rank();
+    int n_dim() const;
+    int n_rank() const;
 
     bool eval(double *point, double *value);
 
@@ -26,8 +26,7 @@
     int rank;
 };
 
+inline int cigma::ZeroFunction::n_dim()  const { return dim; }
+inline int cigma::ZeroFunction::n_rank() const { return rank; }
 
-inline int cigma::ZeroFunction::n_dim() { return dim; }
-inline int cigma::ZeroFunction::n_rank() { return rank; }
-
 #endif



More information about the CIG-COMMITS mailing list