Salome HOME
#18963 Minimize compiler warnings
[modules/med.git] / src / MEDCalc / cmp / MEDCalculator_i.cxx
index e0bafd7afb6f7e9201d27cc66414ad8dded2f0e4..a7b71cabb94d033700a8e8633547257fae4a3dc1 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,7 @@
 #include <string>
 
 #include "MEDCouplingFieldDouble.hxx"
-using namespace ParaMEDMEM;
+using namespace MEDCoupling;
 
 MEDCalculator_i * MEDCalculator_i::_instance = NULL;
 
@@ -247,7 +247,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl
   MEDCouplingFieldDouble* field_result;
   try {
     field_result = field->clone(true);
-    string functionToApply = "u^"+ToString(power);
+    std::string functionToApply = "u^"+ToString(power);
     field_result->applyFunc(functionToApply.c_str());
   }
   catch (INTERP_KERNEL::Exception &ex) {
@@ -255,7 +255,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::pow(const MEDCALC::FieldHandler & f_hdl
   }
 
   // Set the name (the default is the same as the original field)
-  string name(field_result->getName());
+  std::string name(field_result->getName());
   name.append("^");
   name.append(ToString(power));
   field_result->setName(name.c_str());
@@ -286,7 +286,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl
   MEDCouplingFieldDouble* field_result;
   try {
     field_result = field->clone(true);
-    string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset);
+    std::string functionToApply = "u*"+ToString(factor)+"+"+ToString(offset);
     field_result->applyFunc(functionToApply.c_str());
   }
   catch (INTERP_KERNEL::Exception &ex) {
@@ -294,7 +294,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::lin(const MEDCALC::FieldHandler & f_hdl
   }
 
   // Set the name (the default is the same as the original field)
-  string name = string("lin(");
+  std::string name = std::string("lin(");
   name.append(field->getName());
   name.append(",factor=");
   name.append(ToString(factor));
@@ -333,7 +333,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl
   }
 
   // Set the name (the default is the same as the original field)
-  string name = string("dup(");
+  std::string name = std::string("dup(");
   name.append(field->getName());
   name.append(")");
   field_result->setName(name.c_str());
@@ -347,7 +347,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::dup(const MEDCALC::FieldHandler & f_hdl
 /*!
  * This creates a new field by applying a function on the specified
  * field. The function is defined by a string of characters
- * (function), that specifies the litteral equation to apply, and an
+ * (function), that specifies the literal equation to apply, and an
  * integer (nbcomponents), that specifies the number of components to
  * consider in the resulting field. This is to mimic the interface of
  * MEDCouplingFieldDouble::applyFunc.
@@ -365,7 +365,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl
   try {
     field_result = field->clone(true);
     if ( (nbResComponents == MEDCALC::NBCOMP_DEFAULT ) ||
-   (nbResComponents < 1) || (nbResComponents > field_result->getNumberOfComponents()) ) {
+        (nbResComponents < 1) || (nbResComponents > (int)field_result->getNumberOfComponents()) ) {
       field_result->applyFunc(function);
     }
     else {
@@ -376,7 +376,7 @@ MEDCALC::FieldHandler * MEDCalculator_i::fct(const MEDCALC::FieldHandler & f_hdl
     throw KERNEL::createSalomeException(ex.what());
   }
 
-  string name = string("fct("); name.append(field->getName());
+  std::string name = std::string("fct("); name.append(field->getName());
   name.append(",\""); name.append(function);
   name.append(",\""); name.append(ToString(nbResComponents)); name.append("\")");
   field_result->setName(name.c_str());