[GRASS-SVN] r36640 - grass-addons/raster/r.terracost

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 8 15:12:26 EDT 2009


Author: neteler
Date: 2009-04-08 15:12:26 -0400 (Wed, 08 Apr 2009)
New Revision: 36640

Modified:
   grass-addons/raster/r.terracost/input.h
   grass-addons/raster/r.terracost/iterator.cc
   grass-addons/raster/r.terracost/stats.cc
   grass-addons/raster/r.terracost/stats.h
Log:
Andrew Danner <adanner *cs swarthmore.edu>: compilation fixes

Modified: grass-addons/raster/r.terracost/input.h
===================================================================
--- grass-addons/raster/r.terracost/input.h	2009-04-08 15:54:41 UTC (rev 36639)
+++ grass-addons/raster/r.terracost/input.h	2009-04-08 19:12:26 UTC (rev 36640)
@@ -194,12 +194,12 @@
     cout << *this;
   };
 
-  friend ostream& operator << (ostream& s, const ijCostType &ct) {
+  friend ostream& operator << (ostream& s, const ijCostType<T> &ct) {
     s << "(" << ct.getI() << "," << ct.getJ() << ": " << ct.cs << ")";
     return s;
   };
 
-  friend int operator == (const ijCostType &a, const ijCostType &b) {
+  friend int operator == (const ijCostType<T> &a, const ijCostType<T> &b) {
     return (basicIJType(a) == basicIJType(b) && a.cs == b.cs);
   };
   

Modified: grass-addons/raster/r.terracost/iterator.cc
===================================================================
--- grass-addons/raster/r.terracost/iterator.cc	2009-04-08 15:54:41 UTC (rev 36639)
+++ grass-addons/raster/r.terracost/iterator.cc	2009-04-08 19:12:26 UTC (rev 36640)
@@ -39,7 +39,7 @@
   if (iMarker > tileSizeRows - 1)
     return 0;
 
-  *out = tile->get(iMarker, jMarker);
+  *out = tile->getComplex(iMarker, jMarker);
 
   if (iMarker == 0){
     jMarker++;

Modified: grass-addons/raster/r.terracost/stats.cc
===================================================================
--- grass-addons/raster/r.terracost/stats.cc	2009-04-08 15:54:41 UTC (rev 36639)
+++ grass-addons/raster/r.terracost/stats.cc	2009-04-08 19:12:26 UTC (rev 36640)
@@ -113,7 +113,7 @@
 
 
 int
-noclobberFile(char *fname) {
+noclobberFile(const char *fname) {
   int fd=-1;
   
   while(fd<0) {
@@ -162,7 +162,7 @@
 
 /* ********************************************************************** */
 
-statsRecorder::statsRecorder(char *fname) {
+statsRecorder::statsRecorder(const char *fname) {
   //note: in the new version of gcc there is not constructor for
   //ofstream that takes an fd; wrote another noclobber() function that
   //closes fd and returns the name;

Modified: grass-addons/raster/r.terracost/stats.h
===================================================================
--- grass-addons/raster/r.terracost/stats.h	2009-04-08 15:54:41 UTC (rev 36639)
+++ grass-addons/raster/r.terracost/stats.h	2009-04-08 19:12:26 UTC (rev 36640)
@@ -28,14 +28,14 @@
 
 #define HAVE_STATS
 
-int noclobberFile(char *);
+int noclobberFile(const char *);
 
 class statsRecorder : public ofstream {
 private:
   Rtimer tm;
   void *bss;
 public:
-  statsRecorder(char *fname);
+  statsRecorder(const char *fname);
 /*   ~statsRecorder() {  */
 /* 	this->flush();  */
 /*   } */



More information about the grass-commit mailing list