if( from_idx == to_idx )
return;
- assert( from_idx > to_idx && !elem || from_idx < to_idx && elem );
+ assert( (from_idx > to_idx && !elem) || (from_idx < to_idx && elem) );
if( from_idx < seq->count )
{
if( test_progress < 0 )
{
test_progress = 0;
- cpu_freq = cvGetTickFrequency();
- start_time = cvGetTickCount();
+ cpu_freq = cv::getTickFrequency();
+ start_time = cv::getTickCount();
}
- t = cvGetTickCount();
- test_progress = update_progress( test_progress, 0, 0, ((double)(t - start_time))/(cpu_freq*1000) );
+ t = cv::getTickCount();
+ test_progress = update_progress( test_progress, 0, 0, (double)(t - start_time)/cpu_freq );
}
vtx3 = cvGetGraphVtx( graph, idx );
- CV_TS_SEQ_CHECK_CONDITION( CV_IS_SET_ELEM(vtx3) && vtx3->flags == idx &&
- vtx3->first == 0 || idx == idx0 && vtx3 == vtx2 &&
+ CV_TS_SEQ_CHECK_CONDITION( (CV_IS_SET_ELEM(vtx3) && vtx3->flags == idx &&
+ vtx3->first == 0) || (idx == idx0 && vtx3 == vtx2 &&
(!pass_data || pure_vtx_size == 0 ||
- memcmp(vtx3 + 1, vtx + 1, pure_vtx_size) == 0),
+ memcmp(vtx3 + 1, vtx + 1, pure_vtx_size) == 0)),
"The added element is not correct" );
CV_TS_SEQ_CHECK_CONDITION( (!first_free || first_free == (CvSetElem*)vtx3) &&
//edge3 = (CvGraphEdge*)cvGetSetElem( graph->edges, idx );
CV_TS_SEQ_CHECK_CONDITION( res == 1 && edge2 != 0 && CV_IS_SET_ELEM(edge2) &&
- (edge2->vtx[0] == vtx && edge2->vtx[1] == vtx2 ||
- !CV_IS_GRAPH_ORIENTED(graph) && edge2->vtx[0] == vtx2 && edge2->vtx[1] == vtx) &&
+ ((edge2->vtx[0] == vtx && edge2->vtx[1] == vtx2) ||
+ (!CV_IS_GRAPH_ORIENTED(graph) && edge2->vtx[0] == vtx2 && edge2->vtx[1] == vtx)) &&
(!pass_data || pure_edge_size == 0 || memcmp( edge2 + 1, edge + 1, pure_edge_size ) == 0),
"The edge has been added incorrectly" );
idx = edge->flags;
CV_TS_SEQ_CHECK_CONDITION( edge != 0 && edge->weight == v_idx[0] + v_idx[1] &&
- (edge->vtx[0] == vtx && edge->vtx[1] == vtx2 ||
- !CV_IS_GRAPH_ORIENTED(graph) && edge->vtx[1] == vtx && edge->vtx[0] == vtx2) &&
+ ((edge->vtx[0] == vtx && edge->vtx[1] == vtx2) ||
+ (!CV_IS_GRAPH_ORIENTED(graph) && edge->vtx[1] == vtx && edge->vtx[0] == vtx2)) &&
(pure_edge_size == 0 || memcmp(edge + 1, edge_data, pure_edge_size) == 0),
"An edge is missing or incorrect" );
for(;;)
{
int code, a = -1, b = -1;
- char* event = "";
+ const char* event = "";
CV_CALL( code = cvNextGraphItem( scanner ));
switch( code )