@@ -181,15 +181,15 @@ void StreamMeshes(uint32_t modelID, const std::vector<uint32_t> & expressIds, em
181181 }
182182}
183183
184- void StreamMeshesVal (uint32_t modelID, emscripten::val expressIdsVal, emscripten::val callback)
184+ void StreamMeshesWithExpressID (uint32_t modelID, emscripten::val expressIdsVal, emscripten::val callback)
185185{
186186 std::vector<uint32_t > expressIds;
187187
188188 uint32_t size = expressIdsVal[" length" ].as <uint32_t >();
189189 uint32_t index = 0 ;
190- while (index < size)
190+ for ( size_t i= 0 ; i < size; i++)
191191 {
192- emscripten::val expressIdVal = expressIdsVal[std::to_string (index++ )];
192+ emscripten::val expressIdVal = expressIdsVal[std::to_string (i )];
193193
194194 uint32_t expressId = expressIdVal.as <uint32_t >();
195195
@@ -1025,7 +1025,7 @@ EMSCRIPTEN_BINDINGS(my_module) {
10251025 emscripten::function (" IsModelOpen" , &IsModelOpen);
10261026 emscripten::function (" GetGeometry" , &GetGeometry);
10271027 emscripten::function (" GetFlatMesh" , &GetFlatMesh);
1028- emscripten::function (" StreamMeshes" , &StreamMeshesVal );
1028+ emscripten::function (" StreamMeshes" , &StreamMeshesWithExpressID );
10291029 emscripten::function (" GetCoordinationMatrix" , &GetCoordinationMatrix);
10301030 emscripten::function (" StreamAllMeshes" , &StreamAllMeshes);
10311031 emscripten::function (" StreamAllMeshesWithTypes" , &StreamAllMeshesWithTypesVal);
0 commit comments