diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-05-19 01:33:28 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-05-19 14:15:47 +0200 |
| commit | 166a1c681bba659095b1e1296cbb66e9f1637bbd (patch) | |
| tree | 532f95450a884c2612fc7f1423e06b6cc1663b62 | |
| parent | 4ee2ed65f728985e53ba0c76590f07b253b03587 (diff) | |
| download | PROJ-166a1c681bba659095b1e1296cbb66e9f1637bbd.tar.gz PROJ-166a1c681bba659095b1e1296cbb66e9f1637bbd.zip | |
createOperationsWithDatumPivot(): remove useless code
| -rw-r--r-- | src/iso19111/coordinateoperation.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/iso19111/coordinateoperation.cpp b/src/iso19111/coordinateoperation.cpp index d1bc8eb5..4bf5c41e 100644 --- a/src/iso19111/coordinateoperation.cpp +++ b/src/iso19111/coordinateoperation.cpp @@ -12946,7 +12946,6 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot( (isNullFirst || isNullThird || sourceAndTargetAre3D) ? opSecond->shallowClone() : opSecond); - CoordinateOperation *invCOForward = nullptr; if (isNullFirst || isNullThird) { if (opSecondCloned->identifiers().size() == 1 && (*opSecondCloned->identifiers()[0]->codeSpace()) @@ -12960,7 +12959,7 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot( auto invCO = dynamic_cast<InverseCoordinateOperation *>( opSecondCloned.get()); if (invCO) { - invCOForward = invCO->forwardOperation().get(); + auto invCOForward = invCO->forwardOperation().get(); if (invCOForward->identifiers().size() == 1 && (*invCOForward->identifiers()[0]->codeSpace()) .find("DERIVED_FROM") == @@ -12978,25 +12977,19 @@ void CoordinateOperationFactory::Private::createOperationsWithDatumPivot( auto invCO = dynamic_cast<InverseCoordinateOperation *>( opSecondCloned.get()); if (invCO) { - invCOForward = invCO->forwardOperation().get(); + auto invCOForward = invCO->forwardOperation().get(); invCOForward->getPrivate()->use3DHelmert_ = true; } } if (isNullFirst) { auto oldTarget(NN_CHECK_ASSERT(opSecondCloned->targetCRS())); setCRSs(opSecondCloned.get(), sourceCRS, oldTarget); - if (invCOForward) { - setCRSs(invCOForward, oldTarget, sourceCRS); - } } else { subOps.emplace_back(opFirst); } if (isNullThird) { auto oldSource(NN_CHECK_ASSERT(opSecondCloned->sourceCRS())); setCRSs(opSecondCloned.get(), oldSource, targetCRS); - if (invCOForward) { - setCRSs(invCOForward, targetCRS, oldSource); - } subOps.emplace_back(opSecondCloned); } else { subOps.emplace_back(opSecondCloned); |
