Salome HOME
correct a small bug appearing when using the gcc 3.2.1.
[modules/med.git] / src / MEDMEM / test_copie_field_.cxx
index ac68a0b258980723673ea310e8b1b8b32ce336eb..13f3054f9e4fbdfe8c051ffe4f72caf28711c1e8 100644 (file)
@@ -1,4 +1,3 @@
-using namespace std;
 /* Programme de test du constructeur de copies de la classe FIELD_ de MEDMEM
    jroy - 12/12/2002 */
 
@@ -17,6 +16,7 @@ using namespace std;
 #include "MEDMEM_Support.hxx"
 #include "MEDMEM_Field.hxx"
 #include "MEDMEM_define.hxx"
+using namespace MEDMEM;
 
 
 void affiche_field(FIELD_ * myField, const SUPPORT * mySupport)
@@ -53,7 +53,7 @@ void affiche_field(FIELD_ * myField, const SUPPORT * mySupport)
 
 int main (int argc, char ** argv) {
 
-  int read;
+  // int read; !! UNUSED VARIABLE !!
 
   if ((argc !=3) && (argc != 4)) {
     cerr << "Usage : " << argv[0] 
@@ -92,6 +92,7 @@ int main (int argc, char ** argv) {
   //  SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_node",MED_NODE);
   SUPPORT * mySupport = new SUPPORT(myMesh,"On_all_cell",MED_CELL);
   FIELD<double> * myField = new FIELD<double>() ;
+  myField->setValueType(MED_REEL64);
 
   myField->setName(fieldname);
   myField->setSupport(mySupport);
@@ -120,6 +121,11 @@ int main (int argc, char ** argv) {
   FIELD_ * pt_field_2 = new FIELD_(* pt_field_);
   delete myField;
   affiche_field(pt_field_2, pt_field_2->getSupport());
+  
+  delete pt_field_2 ;
+
+  delete mySupport ;
+  delete myMesh ;
 
   return 0;
 }