[GRASS-dev] Re: [GRASS GIS] #1655: problem compiling r.terraflow with g++ 4.7.0

GRASS GIS trac at osgeo.org
Tue May 15 05:49:52 EDT 2012


#1655: problem compiling r.terraflow with g++ 4.7.0
--------------------------------------+-------------------------------------
 Reporter:  hamish                    |       Owner:  grass-dev@…              
     Type:  defect                    |      Status:  new                      
 Priority:  critical                  |   Milestone:  6.4.3                    
Component:  Compiling                 |     Version:  6.4.2                    
 Keywords:  r.terraflow, libiostream  |    Platform:  Linux                    
      Cpu:  x86-64                    |  
--------------------------------------+-------------------------------------

Comment(by hamish):

 {{{
 diff --git a/include/iostream/minmaxheap.h b/include/iostream/minmaxheap.h
 index c3d057a..4991c22 100644
 --- a/include/iostream/minmaxheap.h
 +++ b/include/iostream/minmaxheap.h
 @@ -744,7 +744,7 @@ HeapIndex MinMaxHeap<T>::fill(T* arr, HeapIndex n) {
    //heap must be empty
    assert(this->size()==0);
    for (i = 0; !full() && i<n; i++) {
 -    insert(arr[i]);
 +    this->insert(arr[i]);
    }
    if (i < n) {
      assert(i == this->maxsize);
 @@ -777,13 +777,13 @@ void UnboundedMinMaxHeap<T>::grow() {

    if(old) {
         HeapIndex n = this->size();
 -       this->A = allocateHeap(this->maxsize);  /* allocate a new array */
 +       this->A = this->allocateHeap(this->maxsize);    /* allocate a new
 array */
         /* copy over the old values */
         assert(this->maxsize > n);
         for(HeapIndex i=0; i<=n; i++) { /* why extra value? -RW */
           this->A[i] = old[i];
         }
 -       freeHeap(old);                          /* free up old storage */
 +       this->freeHeap(old);                    /* free up old storage */
    }

  }
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1655#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list