From: crouzet Date: Fri, 9 Mar 2007 08:44:36 +0000 (+0000) Subject: Bug correction on Matrix type X-Git-Tag: V3_2_6pre2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=29313711514bea0f2345c094a4dd6a091c110abd;p=tools%2Fhxx2salome.git Bug correction on Matrix type --- diff --git a/scripts/parse3.awk b/scripts/parse3.awk index 79038ed..ef10617 100644 --- a/scripts/parse3.awk +++ b/scripts/parse3.awk @@ -139,7 +139,7 @@ BEGIN { cpp_impl_a["std::vector*&"]="\tstd::vector* _%s;\n" cpp_impl_a["const std::vector >&"]="\tMatrixClient _%s_client;\n\tint _%s_nbRow;\n\tint _%s_nbCol;\n"\ "\tdouble* _%s_tab = _%s_client.getValue(%s,_%s_nbCol,_%s_nbRow);\n\tstd::vector > _%s(_%s_nbRow);\n"\ - "\tfor (int i=0; i!=_%s_nbRow; ++i)\n\t{\n\t _%s.reserve(_%s_nbCol);\n"\ + "\tfor (int i=0; i!=_%s_nbRow; ++i)\n\t{\n\t _%s[i].resize(_%s_nbCol);\n"\ "\t std::copy(_%s_tab+_%s_nbCol*i,_%s_tab+_%s_nbCol*(i+1), _%s[i].begin());\n\t}\n\tdelete [] _%s_tab;\n" cpp_impl_a["MEDMEM::FIELD*&"]="\tMEDMEM::FIELD* _%s;\n" cpp_impl_a["const MEDMEM::FIELD*"]="\tstd::auto_ptr > _%s ( new MEDMEM::FIELDClient(%s) );\n" @@ -193,7 +193,7 @@ BEGIN { "\tint _rtn_cpp_i=(*_rtn_cpp).size();\n\tint _rtn_cpp_j=(*_rtn_cpp)[0].size();\n"\ "\tdouble* _rtn_tab = new double[_rtn_cpp_i*_rtn_cpp_j];\n"\ "\tfor (int i=0; i!=_rtn_cpp_i; ++i)\n\t std::copy((*_rtn_cpp)[i].begin(),(*_rtn_cpp)[i].end(),_rtn_tab+i*_rtn_cpp_j);\n"\ - "\tSALOME_Matrix_i* _rtn_matrix_i = new SALOME_Matrix_i(*this,_rtn_tab,_rtn_cpp_j,_rtn_cpp_i,true);\n"\ + "\tSALOME_Matrix_i* _rtn_matrix_i = new SALOME_Matrix_i(*this,_rtn_tab,_rtn_cpp_i,_rtn_cpp_j,true);\n"\ "\tSALOME::Matrix_ptr _rtn_ior = _rtn_matrix_i->_this();\n\tdelete _rtn_cpp;\n" cpp_impl_b["const MEDMEM::FIELD*"]=\ "\tMEDMEM::FIELDINT_i * _rtn_field_i = new MEDMEM::FIELDINT_i(const_cast*>(_rtn_cpp),false);\n"\