Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / matio / src / cpp / CreateMatlabTreeVariable.cpp
index 13348c3..5edbe98 100644 (file)
@@ -113,20 +113,16 @@ types::InternalType* CreateMatlabTreeVariable(matvar_t *matVariable)
                             break;
                         }
                     }
-                    temp = to_wide_string((char*)allData[i]->name);
-                    std::wstring wstField(temp);
-                    FREE(temp);
-                    pOut->getAs<types::Struct>()->addField(wstField);
+                    std::string stField(allData[i]->name);
+                    pOut->getAs<types::Struct>()->addField(stField);
                 }
 
                 for (int i = 0; i < pOut->getAs<types::Struct>()->getSize(); i++)
                 {
                     for (int j = 0; j < iSizeStruct; j++)
                     {
-                        temp = to_wide_string((char*)allData[j]->name);
-                        std::wstring wstField(temp);
-                        FREE(temp);
-                        pOut->getAs<types::Struct>()->get(i)->set(wstField, CreateMatlabTreeVariable(allData[i * iSizeStruct + j]));
+                        std::string stField(allData[j]->name);
+                        pOut->getAs<types::Struct>()->get(i)->set(stField, CreateMatlabTreeVariable(allData[i * iSizeStruct + j]));
                     }
                 }
             }