MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / progressCallback

Function progressCallback

source/MRViewer/MRWebRequest.cpp:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204bool progressCallback( cpr::cpr_off_t downloadTotal, cpr::cpr_off_t downloadNow, cpr::cpr_off_t uploadTotal, cpr::cpr_off_t uploadNow, intptr_t userdata )
205{
206 const auto ctxId = (int)userdata;
207 auto& ctx = sRequestContextMap.at( ctxId );
208 if ( downloadNow < downloadTotal )
209 if ( !MR::reportProgress( ctx->downloadCallback, (float)downloadNow / (float)downloadTotal ) )
210 return false;
211 if ( uploadNow < uploadTotal )
212 if ( !MR::reportProgress( ctx->uploadCallback, (float)uploadNow / (float)uploadTotal ) )
213 return false;
214 return true;
215}
216
217}
218#endif

Callers 2

reduceTotalAngleFunction · 0.85
makeDeloneEdgeFlipsFunction · 0.85

Calls 1

reportProgressFunction · 0.85

Tested by

no test coverage detected