[GRASS-SVN] r56932 - grass/trunk/include/iostream

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jun 26 00:45:47 PDT 2013


Author: mmetz
Date: 2013-06-26 00:45:47 -0700 (Wed, 26 Jun 2013)
New Revision: 56932

Modified:
   grass/trunk/include/iostream/empq_adaptive_impl.h
Log:
iostream: init var, fix assert()

Modified: grass/trunk/include/iostream/empq_adaptive_impl.h
===================================================================
--- grass/trunk/include/iostream/empq_adaptive_impl.h	2013-06-26 05:19:05 UTC (rev 56931)
+++ grass/trunk/include/iostream/empq_adaptive_impl.h	2013-06-26 07:45:47 UTC (rev 56932)
@@ -468,8 +468,8 @@
   
   //create an AMI_stream and write in it biggest half elts of im;
   AMI_STREAM<T> *amis0 = new AMI_STREAM<T>();
-  AMI_STREAM<T> *amis1;
-  assert(amis0 && amis1);
+  AMI_STREAM<T> *amis1 = NULL;
+  assert(amis0);
   unsigned long pqsize = im->size();
   //assert(im->size() == im->get_maxsize());
   T x;
@@ -490,6 +490,7 @@
   //sort the stream
   baseCmpType<T> fun;
   AMI_sort(amis0, &amis1, &fun); //XXX laura: replaced this to use a cmp obj
+  assert(amis1);
   delete amis0;
   EMPQAD_DEBUG { cout << "sorted the stream\n"; cout.flush(); }
   



More information about the grass-commit mailing list