]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use standard c++ strings rather than those from libg++.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 6 Apr 1998 09:04:32 +0000 (09:04 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 6 Apr 1998 09:04:32 +0000 (09:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@139 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/numerics/data_io.h
deal.II/deal.II/source/numerics/data_io.cc

index e77800bab8fefc13824f9a2238b9f7eb5b6354ad..5900fe744e857c6c4811273083f0b77fc36ca011 100644 (file)
@@ -6,15 +6,7 @@
 
 #include <base/exceptions.h>
 #include <vector.h>
-
-#ifdef DEBUG
-#  define _G_NO_NRV     // don't use GNU's named return values in debug modes
-#  include <String.h>   // because if we did we'd harvest tons of warnings.
-#  undef _G_NO_NRV
-#else
-#  include <String.h>
-#endif
-
+#include <string>
 
 template <int dim> class Triangulation;
 template <int dim> class DoFHandler;
@@ -360,8 +352,8 @@ class DataOut {
                                      * at present.
                                      */
     void add_data_vector (const dVector &data,
-                         const String  &name,
-                         const String  &units="<dimensionless>");
+                         const string  &name,
+                         const string  &units="<dimensionless>");
 
                                     /**
                                      * Release the pointers to the data
@@ -419,7 +411,7 @@ class DataOut {
                                         /**
                                          * Constructor
                                          */
-       DataEntry (const dVector *data, const String name, const String units);
+       DataEntry (const dVector *data, const string name, const string units);
        
                                         /**
                                          * Pointer to the data vector.
@@ -428,12 +420,12 @@ class DataOut {
                                         /**
                                          * Name of this component.
                                          */
-       String   name;
+       string   name;
                                         /**
                                          * Physical unit name of this
                                          * component.
                                          */
-       String   units;
+       string   units;
     };
 
                                     /**
index 393f8af9302fe3824cb1fe830dd560417e81b8fc..f56716c4a59896bca08b3fce0fcad78de7f5180d 100644 (file)
@@ -103,7 +103,7 @@ void DataIn<dim>::read_ucd (istream &in) {
 
   for (unsigned int cell=0; cell<n_cells; ++cell) 
     {
-      String cell_type;
+      string cell_type;
       int material_id;
       
       in >> dummy          // cell number
@@ -184,8 +184,8 @@ DataOut<dim>::DataEntry::DataEntry () :
 
 template <int dim>
 DataOut<dim>::DataEntry::DataEntry (const dVector *data,
-                                   const String name,
-                                   const String units) :
+                                   const string name,
+                                   const string units) :
                        data(data), name(name), units(units) {};
 
 
@@ -206,8 +206,8 @@ void DataOut<dim>::attach_dof_handler (DoFHandler<dim> &d) {
 
 template <int dim>
 void DataOut<dim>::add_data_vector (const dVector &vec,
-                                   const String  &name,
-                                   const String  &units) {
+                                   const string  &name,
+                                   const string  &units) {
   DataEntry new_entry (&vec, name, units);
   data.push_back (new_entry);
 };

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.