[GRASS-SVN] r54336 - in grass/branches/releasebranch_6_4: include/iostream lib/iostream

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 18 11:27:58 PST 2012


Author: neteler
Date: 2012-12-18 11:27:57 -0800 (Tue, 18 Dec 2012)
New Revision: 54336

Modified:
   grass/branches/releasebranch_6_4/include/iostream/ami_stream.h
   grass/branches/releasebranch_6_4/include/iostream/embuffer.h
   grass/branches/releasebranch_6_4/include/iostream/empq_impl.h
   grass/branches/releasebranch_6_4/lib/iostream/ami_stream.cc
Log:
glynn: Fix some C++ portability warnings (backport of r54330)

Modified: grass/branches/releasebranch_6_4/include/iostream/ami_stream.h
===================================================================
--- grass/branches/releasebranch_6_4/include/iostream/ami_stream.h	2012-12-18 19:27:49 UTC (rev 54335)
+++ grass/branches/releasebranch_6_4/include/iostream/ami_stream.h	2012-12-18 19:27:57 UTC (rev 54336)
@@ -72,7 +72,7 @@
   AMI_ERROR_NO_MAIN_MEMORY_OPERATION,
 };
 
-extern char *ami_str_error[];
+extern const char *ami_str_error[];
 
 //
 // AMI stream types passed to constructors

Modified: grass/branches/releasebranch_6_4/include/iostream/embuffer.h
===================================================================
--- grass/branches/releasebranch_6_4/include/iostream/embuffer.h	2012-12-18 19:27:49 UTC (rev 54335)
+++ grass/branches/releasebranch_6_4/include/iostream/embuffer.h	2012-12-18 19:27:57 UTC (rev 54336)
@@ -986,7 +986,7 @@
 #endif
   }
 
-  T* in_objects[arity]; //pointers to current leading elements of streams
+  std::vector<T*> in_objects(arity); //pointers to current leading elements of streams
   AMI_err ami_err;
   
  

Modified: grass/branches/releasebranch_6_4/include/iostream/empq_impl.h
===================================================================
--- grass/branches/releasebranch_6_4/include/iostream/empq_impl.h	2012-12-18 19:27:49 UTC (rev 54335)
+++ grass/branches/releasebranch_6_4/include/iostream/empq_impl.h	2012-12-18 19:27:57 UTC (rev 54336)
@@ -1247,7 +1247,7 @@
   /* Pointers to current leading elements of streams */
   unsigned int arity = buf->get_nbstreams();
   AMI_STREAM<T>** instreams = buf->get_streams();
-  T* in_objects[arity];
+  std::vector<T*> in_objects(arity);
   AMI_err ami_err;
   unsigned int i, j;
 

Modified: grass/branches/releasebranch_6_4/lib/iostream/ami_stream.cc
===================================================================
--- grass/branches/releasebranch_6_4/lib/iostream/ami_stream.cc	2012-12-18 19:27:49 UTC (rev 54335)
+++ grass/branches/releasebranch_6_4/lib/iostream/ami_stream.cc	2012-12-18 19:27:57 UTC (rev 54336)
@@ -29,7 +29,7 @@
 #include <grass/iostream/ami_stream.h>
 
 
-char *ami_str_error[] = {
+const char *ami_str_error[] = {
   "AMI_ERROR_NO_ERROR",
   "AMI_ERROR_IO_ERROR",
   "AMI_ERROR_END_OF_STREAM",



More information about the grass-commit mailing list