AST: use typed_list where needed 30/19430/3
Clément DAVID [Wed, 27 Sep 2017 10:40:10 +0000 (12:40 +0200)]
Change-Id: I8d2ce12b0bea549e4058c277883f03b569c9ddd8

scilab/modules/ast/includes/types/struct.hxx
scilab/modules/ast/src/cpp/types/struct.cpp
scilab/modules/data_structures/sci_gateway/cpp/sci_getfield.cpp
scilab/modules/elementary_functions/sci_gateway/cpp/sci_max.cpp

index 2767f5e..964fb64 100644 (file)
@@ -111,8 +111,8 @@ public :
     Struct*                     removeField(const std::wstring& _sKey);
     bool                        toString(std::wostringstream& ostr);
     List*                       extractFieldWithoutClone(const std::wstring& _wstField);
-    std::vector<InternalType*>  extractFields(std::vector<std::wstring> _wstFields);
-    std::vector<InternalType*>  extractFields(typed_list* _pArgs);
+    typed_list                  extractFields(std::vector<std::wstring> _wstFields);
+    typed_list                  extractFields(typed_list* _pArgs);
     InternalType *              extractField(const std::wstring& wstField);
 
     Struct*                     resize(int* _piDims, int _iDims);
index e9fa034..32ac073 100644 (file)
@@ -164,7 +164,7 @@ bool Struct::invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_
     else if (in.size() == 1)
     {
         InternalType * arg = in[0];
-        std::vector<InternalType *> _out;
+        typed_list _out;
         if (arg->isString())
         {
             std::vector<std::wstring> wstFields;
@@ -550,9 +550,9 @@ List* Struct::extractFieldWithoutClone(const std::wstring& _wstField)
     return pL;
 }
 
-std::vector<InternalType*> Struct::extractFields(std::vector<std::wstring> _wstFields)
+typed_list Struct::extractFields(std::vector<std::wstring> _wstFields)
 {
-    std::vector<InternalType*> ResultList;
+    typed_list ResultList;
 
     for (int i = 0 ; i < (int)_wstFields.size() ; i++)
     {
@@ -593,9 +593,9 @@ InternalType * Struct::extractField(const std::wstring & wstField)
     }
 }
 
-std::vector<InternalType*> Struct::extractFields(typed_list* _pArgs)
+typed_list Struct::extractFields(typed_list* _pArgs)
 {
-    std::vector<InternalType*> ResultList;
+    typed_list ResultList;
 
     int iDims           = (int)_pArgs->size();
     typed_list pArg;
index 65ec8a4..6043454 100644 (file)
@@ -205,7 +205,7 @@ static types::Function::ReturnValue sci_getfieldStruct(types::typed_list &in, in
 {
     types::InternalType* pIndex = in[0];
     types::Struct* pSt = in[1]->getAs<types::Struct>();
-    std::vector<types::InternalType*> vectResult;
+    types::typed_list vectResult;
 
     if (pIndex->isString())
     {
index a3a2f56..4cd6157 100644 (file)
@@ -50,7 +50,7 @@ types::Function::ReturnValue sci_MinMax(types::typed_list &in, int _iRetCount, t
     types::Double* pDblIndex    = NULL;
     types::Double* pDblOut      = NULL;
 
-    std::vector<types::InternalType*> inputs;
+    types::typed_list inputs;
     std::vector<types::Double*> vectDouble;
 
     void (*pFuncMinMax)(std::vector<types::Double*> vectIn, int iOrientation, types::Double * pDblIndex, types::Double * pOut);