AST: fix some compilation warnings 43/21043/3
Clément DAVID [Mon, 3 Sep 2018 07:42:00 +0000 (09:42 +0200)]
Change-Id: Ie6002555c382327a3a6e92ea294a82fb2ca1d9fe

scilab/modules/ast/src/cpp/analysis/ConstraintManager.cpp
scilab/modules/ast/src/cpp/types/arrayof.cpp

index b62b3a6..c7758da 100644 (file)
@@ -95,6 +95,8 @@ bool ConstraintManager::check(const MPolyConstraintSet & set, const std::vector<
                 return false;
             }
         }
+        default:
+            return false;
     }
 }
 
index 8772fbe..67791b1 100644 (file)
@@ -1638,7 +1638,7 @@ ArrayOf<T>* ArrayOf<T>::resize(int* _piDims, int _iDims)
                 getIndexes(i, piIndexes);
                 int iNewIdx = getIndexWithDims(piIndexes, _piDims, _iDims);
                 pRealData[iNewIdx] = m_pRealData[i];
-                m_pRealData[i] = NULL;
+                m_pRealData[i] = T();
 
                 for (int j = iPreviousNewIdx; j < iNewIdx; ++j)
                 {
@@ -1658,7 +1658,7 @@ ArrayOf<T>* ArrayOf<T>::resize(int* _piDims, int _iDims)
             for (int i = m_iSize; i < iOldSizeMax; ++i)
             {
                 deleteData(m_pRealData[i]);
-                m_pRealData[i] = NULL;
+                m_pRealData[i] = T();
             }
 
             //if (iPreviousNewIdx < iOldSizeMax)
@@ -1666,7 +1666,7 @@ ArrayOf<T>* ArrayOf<T>::resize(int* _piDims, int _iDims)
             //    for (int i = iPreviousNewIdx; i < iOldSizeMax; ++i)
             //    {
             //        pRealData[i] = m_pRealData[i];
-            //        m_pRealData[i] = NULL;
+            //        m_pRealData[i] = T();
             //    }
             //}
             //else