@@ -3609,7 +3609,7 @@ DatabaseContext::getAliasFromOfficialName(const std::string &officialName,
36093609 std::list<std::string> l;
36103610 l.emplace_back (res2.front ()[0 ]);
36113611 l.emplace_back ((*(std::next (res2.begin ())))[0 ]);
3612- const auto uniqueEsriAlias = getUniqueEsriAlias (l);
3612+ std::string uniqueEsriAlias = getUniqueEsriAlias (l);
36133613 if (!uniqueEsriAlias.empty ())
36143614 return uniqueEsriAlias;
36153615 }
@@ -5691,14 +5691,14 @@ AuthorityFactory::Private::createProjectedCRSEnd(const std::string &code,
56915691 pj_add_type_crs_if_needed (text_definition), context ());
56925692 auto projCRS = dynamic_cast <const crs::ProjectedCRS *>(obj.get ());
56935693 if (projCRS) {
5694- const auto conv = projCRS->derivingConversion ();
5694+ auto conv = projCRS->derivingConversion ();
56955695 auto newConv =
56965696 (conv->nameStr () == " unnamed" )
56975697 ? operation::Conversion::create (
56985698 util::PropertyMap ().set (
56995699 common::IdentifiedObject::NAME_KEY, name),
57005700 conv->method (), conv->parameterValues ())
5701- : conv;
5701+ : std::move ( conv) ;
57025702 auto crsRet = crs::ProjectedCRS::create (
57035703 props, projCRS->baseCRS (), newConv,
57045704 projCRS->coordinateSystem ());
@@ -6632,12 +6632,12 @@ operation::CoordinateOperationNNPtr AuthorityFactory::createCoordinateOperation(
66326632 std::string ());
66336633 if (step_direction == " forward" ) {
66346634 ++countExplicitDirection;
6635- operations.push_back (stepOp);
6635+ operations.push_back (std::move ( stepOp) );
66366636 } else if (step_direction == " reverse" ) {
66376637 ++countExplicitDirection;
66386638 operations.push_back (stepOp->inverse ());
66396639 } else {
6640- operations.push_back (stepOp);
6640+ operations.push_back (std::move ( stepOp) );
66416641 }
66426642 }
66436643
@@ -7364,7 +7364,7 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
73647364 " FROM coordinate_operation_view v1 "
73657365 " JOIN coordinate_operation_view v2 " );
73667366
7367- const std::string joinSupersession (
7367+ const char * joinSupersession =
73687368 " LEFT JOIN supersession ss1 ON "
73697369 " ss1.superseded_table_name = v1.table_name AND "
73707370 " ss1.superseded_auth_name = v1.auth_name AND "
@@ -7376,23 +7376,23 @@ AuthorityFactory::createFromCRSCodesWithIntermediates(
73767376 " ss2.superseded_auth_name = v2.auth_name AND "
73777377 " ss2.superseded_code = v2.code AND "
73787378 " ss2.superseded_table_name = ss2.replacement_table_name AND "
7379- " ss2.same_source_target_crs = 1 " ) ;
7379+ " ss2.same_source_target_crs = 1 " ;
73807380 const std::string joinArea (
7381- (discardSuperseded ? joinSupersession : std::string ()) +
7382- " JOIN usage u1 ON "
7383- " u1.object_table_name = v1.table_name AND "
7384- " u1.object_auth_name = v1.auth_name AND "
7385- " u1.object_code = v1.code "
7386- " JOIN extent a1 "
7387- " ON a1.auth_name = u1.extent_auth_name AND "
7388- " a1.code = u1.extent_code "
7389- " JOIN usage u2 ON "
7390- " u2.object_table_name = v2.table_name AND "
7391- " u2.object_auth_name = v2.auth_name AND "
7392- " u2.object_code = v2.code "
7393- " JOIN extent a2 "
7394- " ON a2.auth_name = u2.extent_auth_name AND "
7395- " a2.code = u2.extent_code " );
7381+ (discardSuperseded ? std::string ( joinSupersession) : std::string ())
7382+ . append ( " JOIN usage u1 ON "
7383+ " u1.object_table_name = v1.table_name AND "
7384+ " u1.object_auth_name = v1.auth_name AND "
7385+ " u1.object_code = v1.code "
7386+ " JOIN extent a1 "
7387+ " ON a1.auth_name = u1.extent_auth_name AND "
7388+ " a1.code = u1.extent_code "
7389+ " JOIN usage u2 ON "
7390+ " u2.object_table_name = v2.table_name AND "
7391+ " u2.object_auth_name = v2.auth_name AND "
7392+ " u2.object_code = v2.code "
7393+ " JOIN extent a2 "
7394+ " ON a2.auth_name = u2.extent_auth_name AND "
7395+ " a2.code = u2.extent_code " ) );
73967396 const std::string orderBy (
73977397 " ORDER BY (CASE WHEN accuracy1 is NULL THEN 1 ELSE 0 END) + "
73987398 " (CASE WHEN accuracy2 is NULL THEN 1 ELSE 0 END), "
@@ -9247,12 +9247,12 @@ AuthorityFactory::createObjectsFromNameEx(
92479247
92489248 const auto &auth_name = row[1 ];
92499249 const auto &code = row[2 ];
9250- const auto key =
9250+ auto key =
92519251 std::pair<std::string, std::string>(auth_name, code);
92529252 if (setIdentified.find (key) != setIdentified.end ()) {
92539253 continue ;
92549254 }
9255- setIdentified.insert (key);
9255+ setIdentified.insert (std::move ( key) );
92569256 auto factory = d->createFactory (auth_name);
92579257 res.emplace_back (PairObjectName (
92589258 factory->createGeodeticDatum (code), name));
0 commit comments