Inserts poly p and fglmvector v without copying into border, reAllocs Memory if necessary, and increases borderSize. Remember: The poly of border is deleted via ~borderElem in ~fglmSdata! Sets m= NULL to indicate that now border is ow(e?)ing the poly.
| 438 | // Remember: The poly of border is deleted via ~borderElem in ~fglmSdata! |
| 439 | // Sets m= NULL to indicate that now border is ow(e?)ing the poly. |
| 440 | void |
| 441 | fglmSdata::newBorderElem( poly & m, fglmVector v ) |
| 442 | { |
| 443 | borderSize++; |
| 444 | if ( borderSize == borderMax ) { |
| 445 | #ifndef HAVE_EXPLICIT_CONSTR |
| 446 | borderElem * tempborder = new borderElem[ borderMax+borderBS ]; |
| 447 | for ( int k = 0; k < borderMax; k++ ) { |
| 448 | tempborder[k]= border[k]; |
| 449 | border[k].insertElem( NULL, fglmVector() ); |
| 450 | } |
| 451 | delete [] border; |
| 452 | border= tempborder; |
| 453 | #else |
| 454 | border= (borderElem *)omReallocSize( border, borderMax*sizeof( borderElem ), (borderMax + borderBS)*sizeof( borderElem ) ); |
| 455 | #endif |
| 456 | borderMax+= borderBS; |
| 457 | } |
| 458 | #ifndef HAVE_EXPLICIT_CONSTR |
| 459 | border[borderSize].insertElem( m, v ); |
| 460 | #else |
| 461 | border[borderSize].borderElem( m, v ); |
| 462 | #endif |
| 463 | m= NULL; |
| 464 | } |
| 465 | |
| 466 | fglmSelem |
| 467 | fglmSdata::nextCandidate() |
no test coverage detected