[GRASS-SVN] r54335 - in grass/branches/develbranch_6: include/iostream lib/iostream

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


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

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

Modified: grass/branches/develbranch_6/include/iostream/ami_stream.h
===================================================================
--- grass/branches/develbranch_6/include/iostream/ami_stream.h	2012-12-18 19:26:31 UTC (rev 54334)
+++ grass/branches/develbranch_6/include/iostream/ami_stream.h	2012-12-18 19:27:49 UTC (rev 54335)
@@ -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/develbranch_6/include/iostream/embuffer.h
===================================================================
--- grass/branches/develbranch_6/include/iostream/embuffer.h	2012-12-18 19:26:31 UTC (rev 54334)
+++ grass/branches/develbranch_6/include/iostream/embuffer.h	2012-12-18 19:27:49 UTC (rev 54335)
@@ -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/develbranch_6/include/iostream/empq_impl.h
===================================================================
--- grass/branches/develbranch_6/include/iostream/empq_impl.h	2012-12-18 19:26:31 UTC (rev 54334)
+++ grass/branches/develbranch_6/include/iostream/empq_impl.h	2012-12-18 19:27:49 UTC (rev 54335)
@@ -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/develbranch_6/lib/iostream/ami_stream.cc
===================================================================
--- grass/branches/develbranch_6/lib/iostream/ami_stream.cc	2012-12-18 19:26:31 UTC (rev 54334)
+++ grass/branches/develbranch_6/lib/iostream/ami_stream.cc	2012-12-18 19:27:49 UTC (rev 54335)
@@ -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