From 53ed2e02d64a6ba26f872b53907aab44c2b39224 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 9 Jan 2025 16:35:53 +0100 Subject: [PATCH] Use std::make_unique<> instead of internal::make_unique<> --- include/proj/internal/internal.hpp | 6 --- src/grids.cpp | 11 ++--- src/iso19111/c_api.cpp | 2 +- src/iso19111/common.cpp | 34 ++++++------- src/iso19111/coordinates.cpp | 9 ++-- src/iso19111/coordinatesystem.cpp | 13 +++-- src/iso19111/crs.cpp | 48 +++++++++---------- src/iso19111/datum.cpp | 46 ++++++++---------- src/iso19111/factory.cpp | 10 ++-- src/iso19111/io.cpp | 18 +++---- src/iso19111/metadata.cpp | 43 ++++++++--------- .../operation/concatenatedoperation.cpp | 5 +- .../operation/coordinateoperation_private.hpp | 6 +-- .../operation/coordinateoperationfactory.cpp | 4 +- src/iso19111/operation/parametervalue.cpp | 12 ++--- src/iso19111/operation/singleoperation.cpp | 22 ++++----- src/iso19111/operation/transformation.cpp | 4 +- src/iso19111/util.cpp | 35 +++++++------- 18 files changed, 154 insertions(+), 174 deletions(-) diff --git a/include/proj/internal/internal.hpp b/include/proj/internal/internal.hpp index 6d6bedff0f..22351c5f23 100644 --- a/include/proj/internal/internal.hpp +++ b/include/proj/internal/internal.hpp @@ -95,12 +95,6 @@ template inline To down_cast(From *f) { return static_cast(f); } -/* Borrowed from C++14 */ -template -std::unique_ptr make_unique(Args &&...args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - PROJ_FOR_TEST std::string replaceAll(const std::string &str, const std::string &before, const std::string &after); diff --git a/src/grids.cpp b/src/grids.cpp index a3cd5c3659..624f2dfa13 100644 --- a/src/grids.cpp +++ b/src/grids.cpp @@ -306,7 +306,7 @@ GTXVerticalShiftGrid *GTXVerticalShiftGrid::open(PJ_CONTEXT *ctx, // Cache up to 1 megapixel per GTX file const int maxLinesInCache = 1024 * 1024 / columns; - auto cache = internal::make_unique(maxLinesInCache); + auto cache = std::make_unique(maxLinesInCache); return new GTXVerticalShiftGrid(ctx, std::move(fp), name, columns, rows, extent, std::move(cache)); } @@ -1588,8 +1588,7 @@ GTiffVGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr fp, const std::string &gridName = grid->metadataItem("grid_name"); const std::string &parentName = grid->metadataItem("parent_grid_name"); - auto vgrid = - internal::make_unique(std::move(grid), idxSample); + auto vgrid = std::make_unique(std::move(grid), idxSample); insertIntoHierarchy(ctx, std::move(vgrid), gridName, parentName, set->m_grids, mapGrids); @@ -2324,7 +2323,7 @@ std::unique_ptr NTv2GridSet::open(PJ_CONTEXT *ctx, // Cache up to 1 megapixel per NTv2 file const int maxLinesInCache = 1024 * 1024 / largestLine; - set->m_cache = internal::make_unique(maxLinesInCache); + set->m_cache = std::make_unique(maxLinesInCache); for (const auto &kv : mapGrids) { kv.second->setCache(set->m_cache.get()); } @@ -2633,7 +2632,7 @@ GTiffHGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr fp, const std::string &gridName = grid->metadataItem("grid_name"); const std::string &parentName = grid->metadataItem("parent_grid_name"); - auto hgrid = internal::make_unique( + auto hgrid = std::make_unique( std::move(grid), idxLatShift, idxLongShift, convFactorToRadian, positiveEast); @@ -3030,7 +3029,7 @@ GTiffGenericGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr fp, const std::string &gridName = grid->metadataItem("grid_name"); const std::string &parentName = grid->metadataItem("parent_grid_name"); - auto ggrid = internal::make_unique(std::move(grid)); + auto ggrid = std::make_unique(std::move(grid)); if (!set->m_grids.empty() && ggrid->metadataItem("TYPE").empty() && !set->m_grids[0]->metadataItem("TYPE").empty()) { ggrid->setFirstGrid(set->m_grids[0].get()); diff --git a/src/iso19111/c_api.cpp b/src/iso19111/c_api.cpp index 5d1180d875..dbf1cfb738 100644 --- a/src/iso19111/c_api.cpp +++ b/src/iso19111/c_api.cpp @@ -2751,7 +2751,7 @@ PJ_OBJ_LIST *proj_identify(PJ_CONTEXT *ctx, const PJ *obj, ++i; } } - auto ret = internal::make_unique(std::move(objects)); + auto ret = std::make_unique(std::move(objects)); if (out_confidence) { *out_confidence = confidenceTemp; confidenceTemp = nullptr; diff --git a/src/iso19111/common.cpp b/src/iso19111/common.cpp index 02bb376959..70f240493c 100644 --- a/src/iso19111/common.cpp +++ b/src/iso19111/common.cpp @@ -91,13 +91,13 @@ UnitOfMeasure::UnitOfMeasure(const std::string &nameIn, double toSIIn, UnitOfMeasure::Type typeIn, const std::string &codeSpaceIn, const std::string &codeIn) - : d(internal::make_unique(nameIn, toSIIn, typeIn, codeSpaceIn, - codeIn)) {} + : d(std::make_unique(nameIn, toSIIn, typeIn, codeSpaceIn, + codeIn)) {} // --------------------------------------------------------------------------- UnitOfMeasure::UnitOfMeasure(const UnitOfMeasure &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -376,12 +376,12 @@ struct Measure::Private { /** \brief Instantiate a Measure. */ Measure::Measure(double valueIn, const UnitOfMeasure &unitIn) - : d(internal::make_unique(valueIn, unitIn)) {} + : d(std::make_unique(valueIn, unitIn)) {} // --------------------------------------------------------------------------- Measure::Measure(const Measure &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -555,18 +555,18 @@ struct DateTime::Private { // --------------------------------------------------------------------------- -DateTime::DateTime() : d(internal::make_unique(std::string())) {} +DateTime::DateTime() : d(std::make_unique(std::string())) {} // --------------------------------------------------------------------------- DateTime::DateTime(const std::string &str) - : d(internal::make_unique(str)) {} + : d(std::make_unique(str)) {} // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress DateTime::DateTime(const DateTime &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} //! @endcond // --------------------------------------------------------------------------- @@ -626,12 +626,12 @@ struct IdentifiedObject::Private { // --------------------------------------------------------------------------- -IdentifiedObject::IdentifiedObject() : d(internal::make_unique()) {} +IdentifiedObject::IdentifiedObject() : d(std::make_unique()) {} // --------------------------------------------------------------------------- IdentifiedObject::IdentifiedObject(const IdentifiedObject &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -975,13 +975,13 @@ struct ObjectDomain::Private { //! @cond Doxygen_Suppress ObjectDomain::ObjectDomain(const optional &scopeIn, const ExtentPtr &extent) - : d(internal::make_unique(scopeIn, extent)) {} + : d(std::make_unique(scopeIn, extent)) {} //! @endcond // --------------------------------------------------------------------------- ObjectDomain::ObjectDomain(const ObjectDomain &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -1167,12 +1167,12 @@ struct ObjectUsage::Private { // --------------------------------------------------------------------------- -ObjectUsage::ObjectUsage() : d(internal::make_unique()) {} +ObjectUsage::ObjectUsage() : d(std::make_unique()) {} // --------------------------------------------------------------------------- ObjectUsage::ObjectUsage(const ObjectUsage &other) - : IdentifiedObject(other), d(internal::make_unique(*(other.d))) {} + : IdentifiedObject(other), d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -1320,17 +1320,17 @@ struct DataEpoch::Private { // --------------------------------------------------------------------------- -DataEpoch::DataEpoch() : d(internal::make_unique(Measure())) {} +DataEpoch::DataEpoch() : d(std::make_unique(Measure())) {} // --------------------------------------------------------------------------- DataEpoch::DataEpoch(const Measure &coordinateEpochIn) - : d(internal::make_unique(coordinateEpochIn)) {} + : d(std::make_unique(coordinateEpochIn)) {} // --------------------------------------------------------------------------- DataEpoch::DataEpoch(const DataEpoch &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/coordinates.cpp b/src/iso19111/coordinates.cpp index 21751f294a..6f26f75d58 100644 --- a/src/iso19111/coordinates.cpp +++ b/src/iso19111/coordinates.cpp @@ -65,16 +65,15 @@ struct CoordinateMetadata::Private { // --------------------------------------------------------------------------- CoordinateMetadata::CoordinateMetadata(const crs::CRSNNPtr &crsIn) - : d(internal::make_unique(crsIn)) {} + : d(std::make_unique(crsIn)) {} // --------------------------------------------------------------------------- CoordinateMetadata::CoordinateMetadata(const crs::CRSNNPtr &crsIn, double coordinateEpochAsDecimalYearIn) - : d(internal::make_unique( - crsIn, - common::DataEpoch(common::Measure(coordinateEpochAsDecimalYearIn, - common::UnitOfMeasure::YEAR)))) {} + : d(std::make_unique(crsIn, common::DataEpoch(common::Measure( + coordinateEpochAsDecimalYearIn, + common::UnitOfMeasure::YEAR)))) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/coordinatesystem.cpp b/src/iso19111/coordinatesystem.cpp index 15a0ba6010..459a1c155d 100644 --- a/src/iso19111/coordinatesystem.cpp +++ b/src/iso19111/coordinatesystem.cpp @@ -84,13 +84,13 @@ struct Meridian::Private { // --------------------------------------------------------------------------- Meridian::Meridian(const common::Angle &longitudeIn) - : d(internal::make_unique(longitudeIn)) {} + : d(std::make_unique(longitudeIn)) {} // --------------------------------------------------------------------------- #ifdef notdef Meridian::Meridian(const Meridian &other) - : IdentifiedObject(other), d(internal::make_unique(*other.d)) {} + : IdentifiedObject(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -182,14 +182,13 @@ struct CoordinateSystemAxis::Private { // --------------------------------------------------------------------------- -CoordinateSystemAxis::CoordinateSystemAxis() - : d(internal::make_unique()) {} +CoordinateSystemAxis::CoordinateSystemAxis() : d(std::make_unique()) {} // --------------------------------------------------------------------------- #ifdef notdef CoordinateSystemAxis::CoordinateSystemAxis(const CoordinateSystemAxis &other) - : IdentifiedObject(other), d(internal::make_unique(*other.d)) {} + : IdentifiedObject(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -599,13 +598,13 @@ struct CoordinateSystem::Private { CoordinateSystem::CoordinateSystem( const std::vector &axisIn) - : d(internal::make_unique(axisIn)) {} + : d(std::make_unique(axisIn)) {} // --------------------------------------------------------------------------- #ifdef notdef CoordinateSystem::CoordinateSystem(const CoordinateSystem &other) - : IdentifiedObject(other), d(internal::make_unique(*other.d)) {} + : IdentifiedObject(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- diff --git a/src/iso19111/crs.cpp b/src/iso19111/crs.cpp index e304669e52..7a0ac45bf0 100644 --- a/src/iso19111/crs.cpp +++ b/src/iso19111/crs.cpp @@ -142,12 +142,12 @@ struct CRS::Private { // --------------------------------------------------------------------------- -CRS::CRS() : d(internal::make_unique()) {} +CRS::CRS() : d(std::make_unique()) {} // --------------------------------------------------------------------------- CRS::CRS(const CRS &other) - : ObjectUsage(other), d(internal::make_unique(*(other.d))) {} + : ObjectUsage(other), d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -1574,12 +1574,12 @@ struct SingleCRS::Private { SingleCRS::SingleCRS(const datum::DatumPtr &datumIn, const datum::DatumEnsemblePtr &datumEnsembleIn, const cs::CoordinateSystemNNPtr &csIn) - : d(internal::make_unique(datumIn, datumEnsembleIn, csIn)) {} + : d(std::make_unique(datumIn, datumEnsembleIn, csIn)) {} // --------------------------------------------------------------------------- SingleCRS::SingleCRS(const SingleCRS &other) - : CRS(other), d(internal::make_unique(*other.d)) {} + : CRS(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -1768,7 +1768,7 @@ GeodeticCRS::GeodeticCRS(const datum::GeodeticReferenceFramePtr &datumIn, const cs::EllipsoidalCSNNPtr &csIn) : SingleCRS(datumIn, checkEnsembleForGeodeticCRS(datumIn, datumEnsembleIn), csIn), - d(internal::make_unique(datumIn)) {} + d(std::make_unique(datumIn)) {} // --------------------------------------------------------------------------- @@ -1777,7 +1777,7 @@ GeodeticCRS::GeodeticCRS(const datum::GeodeticReferenceFramePtr &datumIn, const cs::SphericalCSNNPtr &csIn) : SingleCRS(datumIn, checkEnsembleForGeodeticCRS(datumIn, datumEnsembleIn), csIn), - d(internal::make_unique(datumIn)) {} + d(std::make_unique(datumIn)) {} // --------------------------------------------------------------------------- @@ -1786,12 +1786,12 @@ GeodeticCRS::GeodeticCRS(const datum::GeodeticReferenceFramePtr &datumIn, const cs::CartesianCSNNPtr &csIn) : SingleCRS(datumIn, checkEnsembleForGeodeticCRS(datumIn, datumEnsembleIn), csIn), - d(internal::make_unique(datumIn)) {} + d(std::make_unique(datumIn)) {} // --------------------------------------------------------------------------- GeodeticCRS::GeodeticCRS(const GeodeticCRS &other) - : SingleCRS(other), d(internal::make_unique(*other.d)) {} + : SingleCRS(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -3027,13 +3027,13 @@ GeographicCRS::GeographicCRS(const datum::GeodeticReferenceFramePtr &datumIn, : SingleCRS(datumIn, datumEnsembleIn, csIn), GeodeticCRS(datumIn, checkEnsembleForGeodeticCRS(datumIn, datumEnsembleIn), csIn), - d(internal::make_unique(csIn)) {} + d(std::make_unique(csIn)) {} // --------------------------------------------------------------------------- GeographicCRS::GeographicCRS(const GeographicCRS &other) : SingleCRS(other), GeodeticCRS(other), - d(internal::make_unique(*other.d)) {} + d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -3437,12 +3437,12 @@ VerticalCRS::VerticalCRS(const datum::VerticalReferenceFramePtr &datumIn, const cs::VerticalCSNNPtr &csIn) : SingleCRS(datumIn, checkEnsembleForVerticalCRS(datumIn, datumEnsembleIn), csIn), - d(internal::make_unique()) {} + d(std::make_unique()) {} // --------------------------------------------------------------------------- VerticalCRS::VerticalCRS(const VerticalCRS &other) - : SingleCRS(other), d(internal::make_unique(*other.d)) {} + : SingleCRS(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -4024,7 +4024,7 @@ DerivedCRS::DerivedCRS(const SingleCRSNNPtr &baseCRSIn, #if !defined(COMPILER_WARNS_ABOUT_ABSTRACT_VBASE_INIT) SingleCRS(baseCRSIn->datum(), baseCRSIn->datumEnsemble(), cs), #endif - d(internal::make_unique(baseCRSIn, derivingConversionIn)) { + d(std::make_unique(baseCRSIn, derivingConversionIn)) { } // --------------------------------------------------------------------------- @@ -4034,7 +4034,7 @@ DerivedCRS::DerivedCRS(const DerivedCRS &other) #if !defined(COMPILER_WARNS_ABOUT_ABSTRACT_VBASE_INIT) SingleCRS(other), #endif - d(internal::make_unique(*other.d)) { + d(std::make_unique(*other.d)) { } // --------------------------------------------------------------------------- @@ -4182,14 +4182,13 @@ ProjectedCRS::ProjectedCRS( const cs::CartesianCSNNPtr &csIn) : SingleCRS(baseCRSIn->datum(), baseCRSIn->datumEnsemble(), csIn), DerivedCRS(baseCRSIn, derivingConversionIn, csIn), - d(internal::make_unique(baseCRSIn, csIn)) {} + d(std::make_unique(baseCRSIn, csIn)) {} // --------------------------------------------------------------------------- ProjectedCRS::ProjectedCRS(const ProjectedCRS &other) : SingleCRS(other), DerivedCRS(other), - d(internal::make_unique(other.baseCRS(), - other.coordinateSystem())) {} + d(std::make_unique(other.baseCRS(), other.coordinateSystem())) {} // --------------------------------------------------------------------------- @@ -5154,14 +5153,14 @@ struct CompoundCRS::Private { // --------------------------------------------------------------------------- CompoundCRS::CompoundCRS(const std::vector &components) - : CRS(), d(internal::make_unique()) { + : CRS(), d(std::make_unique()) { d->components_ = components; } // --------------------------------------------------------------------------- CompoundCRS::CompoundCRS(const CompoundCRS &other) - : CRS(other), d(internal::make_unique(*other.d)) {} + : CRS(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -5735,15 +5734,14 @@ BoundCRS::Private::Private( BoundCRS::BoundCRS(const CRSNNPtr &baseCRSIn, const CRSNNPtr &hubCRSIn, const operation::TransformationNNPtr &transformationIn) - : d(internal::make_unique(baseCRSIn, hubCRSIn, transformationIn)) { -} + : d(std::make_unique(baseCRSIn, hubCRSIn, transformationIn)) {} // --------------------------------------------------------------------------- BoundCRS::BoundCRS(const BoundCRS &other) : CRS(other), - d(internal::make_unique(other.d->baseCRS(), other.d->hubCRS(), - other.d->transformation())) {} + d(std::make_unique(other.d->baseCRS(), other.d->hubCRS(), + other.d->transformation())) {} // --------------------------------------------------------------------------- @@ -6977,12 +6975,12 @@ EngineeringCRS::~EngineeringCRS() = default; EngineeringCRS::EngineeringCRS(const datum::EngineeringDatumNNPtr &datumIn, const cs::CoordinateSystemNNPtr &csIn) : SingleCRS(datumIn.as_nullable(), nullptr, csIn), - d(internal::make_unique()) {} + d(std::make_unique()) {} // --------------------------------------------------------------------------- EngineeringCRS::EngineeringCRS(const EngineeringCRS &other) - : SingleCRS(other), d(internal::make_unique(*(other.d))) {} + : SingleCRS(other), d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/datum.cpp b/src/iso19111/datum.cpp index 9baa1d0faf..02d3356fdb 100644 --- a/src/iso19111/datum.cpp +++ b/src/iso19111/datum.cpp @@ -157,13 +157,13 @@ void Datum::Private::exportAnchorEpoch(io::JSONFormatter *formatter) const { // --------------------------------------------------------------------------- -Datum::Datum() : d(internal::make_unique()) {} +Datum::Datum() : d(std::make_unique()) {} // --------------------------------------------------------------------------- #ifdef notdef Datum::Datum(const Datum &other) - : ObjectUsage(other), d(internal::make_unique(*other.d)) {} + : ObjectUsage(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -341,14 +341,13 @@ struct PrimeMeridian::Private { // --------------------------------------------------------------------------- PrimeMeridian::PrimeMeridian(const common::Angle &longitudeIn) - : d(internal::make_unique(longitudeIn)) {} + : d(std::make_unique(longitudeIn)) {} // --------------------------------------------------------------------------- #ifdef notdef PrimeMeridian::PrimeMeridian(const PrimeMeridian &other) - : common::IdentifiedObject(other), - d(internal::make_unique(*other.d)) {} + : common::IdentifiedObject(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -598,30 +597,29 @@ struct Ellipsoid::Private { Ellipsoid::Ellipsoid(const common::Length &radius, const std::string &celestialBodyIn) - : d(internal::make_unique(radius, celestialBodyIn)) {} + : d(std::make_unique(radius, celestialBodyIn)) {} // --------------------------------------------------------------------------- Ellipsoid::Ellipsoid(const common::Length &semiMajorAxisIn, const common::Scale &invFlattening, const std::string &celestialBodyIn) - : d(internal::make_unique(semiMajorAxisIn, invFlattening, - celestialBodyIn)) {} + : d(std::make_unique(semiMajorAxisIn, invFlattening, + celestialBodyIn)) {} // --------------------------------------------------------------------------- Ellipsoid::Ellipsoid(const common::Length &semiMajorAxisIn, const common::Length &semiMinorAxisIn, const std::string &celestialBodyIn) - : d(internal::make_unique(semiMajorAxisIn, semiMinorAxisIn, - celestialBodyIn)) {} + : d(std::make_unique(semiMajorAxisIn, semiMinorAxisIn, + celestialBodyIn)) {} // --------------------------------------------------------------------------- #ifdef notdef Ellipsoid::Ellipsoid(const Ellipsoid &other) - : common::IdentifiedObject(other), - d(internal::make_unique(*other.d)) {} + : common::IdentifiedObject(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -630,7 +628,7 @@ Ellipsoid::Ellipsoid(const Ellipsoid &other) Ellipsoid::~Ellipsoid() = default; Ellipsoid::Ellipsoid(const Ellipsoid &other) - : IdentifiedObject(other), d(internal::make_unique(*(other.d))) {} + : IdentifiedObject(other), d(std::make_unique(*(other.d))) {} //! @endcond @@ -1232,14 +1230,14 @@ struct GeodeticReferenceFrame::Private { GeodeticReferenceFrame::GeodeticReferenceFrame( const EllipsoidNNPtr &ellipsoidIn, const PrimeMeridianNNPtr &primeMeridianIn) - : d(internal::make_unique(ellipsoidIn, primeMeridianIn)) {} + : d(std::make_unique(ellipsoidIn, primeMeridianIn)) {} // --------------------------------------------------------------------------- #ifdef notdef GeodeticReferenceFrame::GeodeticReferenceFrame( const GeodeticReferenceFrame &other) - : Datum(other), d(internal::make_unique(*other.d)) {} + : Datum(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -1640,7 +1638,7 @@ DynamicGeodeticReferenceFrame::DynamicGeodeticReferenceFrame( const common::Measure &frameReferenceEpochIn, const util::optional &deformationModelNameIn) : GeodeticReferenceFrame(ellipsoidIn, primeMeridianIn), - d(internal::make_unique(frameReferenceEpochIn)) { + d(std::make_unique(frameReferenceEpochIn)) { d->deformationModelName = deformationModelNameIn; } @@ -1649,8 +1647,7 @@ DynamicGeodeticReferenceFrame::DynamicGeodeticReferenceFrame( #ifdef notdef DynamicGeodeticReferenceFrame::DynamicGeodeticReferenceFrame( const DynamicGeodeticReferenceFrame &other) - : GeodeticReferenceFrame(other), - d(internal::make_unique(*other.d)) {} + : GeodeticReferenceFrame(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -1786,13 +1783,13 @@ struct DatumEnsemble::Private { DatumEnsemble::DatumEnsemble(const std::vector &datumsIn, const metadata::PositionalAccuracyNNPtr &accuracy) - : d(internal::make_unique(datumsIn, accuracy)) {} + : d(std::make_unique(datumsIn, accuracy)) {} // --------------------------------------------------------------------------- #ifdef notdef DatumEnsemble::DatumEnsemble(const DatumEnsemble &other) - : common::ObjectUsage(other), d(internal::make_unique(*other.d)) {} + : common::ObjectUsage(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -2086,7 +2083,7 @@ struct VerticalReferenceFrame::Private { VerticalReferenceFrame::VerticalReferenceFrame( const util::optional &realizationMethodIn) - : d(internal::make_unique()) { + : d(std::make_unique()) { if (!realizationMethodIn->toString().empty()) { d->realizationMethod_ = *realizationMethodIn; } @@ -2323,7 +2320,7 @@ DynamicVerticalReferenceFrame::DynamicVerticalReferenceFrame( const common::Measure &frameReferenceEpochIn, const util::optional &deformationModelNameIn) : VerticalReferenceFrame(realizationMethodIn), - d(internal::make_unique(frameReferenceEpochIn)) { + d(std::make_unique(frameReferenceEpochIn)) { d->deformationModelName = deformationModelNameIn; } @@ -2332,8 +2329,7 @@ DynamicVerticalReferenceFrame::DynamicVerticalReferenceFrame( #ifdef notdef DynamicVerticalReferenceFrame::DynamicVerticalReferenceFrame( const DynamicVerticalReferenceFrame &other) - : VerticalReferenceFrame(other), - d(internal::make_unique(*other.d)) {} + : VerticalReferenceFrame(other), d(std::make_unique(*other.d)) {} #endif // --------------------------------------------------------------------------- @@ -2467,7 +2463,7 @@ struct TemporalDatum::Private { TemporalDatum::TemporalDatum(const common::DateTime &temporalOriginIn, const std::string &calendarIn) - : d(internal::make_unique(temporalOriginIn, calendarIn)) {} + : d(std::make_unique(temporalOriginIn, calendarIn)) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/factory.cpp b/src/iso19111/factory.cpp index 29059b83ca..793bffae58 100644 --- a/src/iso19111/factory.cpp +++ b/src/iso19111/factory.cpp @@ -2942,7 +2942,7 @@ DatabaseContext::~DatabaseContext() { // --------------------------------------------------------------------------- -DatabaseContext::DatabaseContext() : d(internal::make_unique()) {} +DatabaseContext::DatabaseContext() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -4308,7 +4308,7 @@ AuthorityFactory::~AuthorityFactory() = default; AuthorityFactory::AuthorityFactory(const DatabaseContextNNPtr &context, const std::string &authorityName) - : d(internal::make_unique(context, authorityName)) {} + : d(std::make_unique(context, authorityName)) {} // --------------------------------------------------------------------------- @@ -10175,8 +10175,8 @@ struct NoSuchAuthorityCodeException::Private { NoSuchAuthorityCodeException::NoSuchAuthorityCodeException( const std::string &message, const std::string &authority, const std::string &code) - : FactoryException(message), - d(internal::make_unique(authority, code)) {} + : FactoryException(message), d(std::make_unique(authority, code)) { +} // --------------------------------------------------------------------------- @@ -10186,7 +10186,7 @@ NoSuchAuthorityCodeException::~NoSuchAuthorityCodeException() = default; NoSuchAuthorityCodeException::NoSuchAuthorityCodeException( const NoSuchAuthorityCodeException &other) - : FactoryException(other), d(internal::make_unique(*(other.d))) {} + : FactoryException(other), d(std::make_unique(*(other.d))) {} //! @endcond // --------------------------------------------------------------------------- diff --git a/src/iso19111/io.cpp b/src/iso19111/io.cpp index a7ac827049..1bf35eae9e 100644 --- a/src/iso19111/io.cpp +++ b/src/iso19111/io.cpp @@ -356,7 +356,7 @@ const std::string &WKTFormatter::toString() const { // --------------------------------------------------------------------------- WKTFormatter::WKTFormatter(Convention convention) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->params_.convention_ = convention; switch (convention) { case Convention::WKT2_2019: @@ -895,7 +895,7 @@ void WKTFormatter::ingestWKTNode(const WKTNodeNNPtr &node) { //! @cond Doxygen_Suppress static WKTNodeNNPtr - null_node(NN_NO_CHECK(internal::make_unique(std::string()))); + null_node(NN_NO_CHECK(std::make_unique(std::string()))); static inline bool isNull(const WKTNodeNNPtr &node) { return &node == &null_node; @@ -1018,7 +1018,7 @@ const WKTNodeNNPtr &WKTNode::Private::lookForChild( * @param valueIn the name of the node. */ WKTNode::WKTNode(const std::string &valueIn) - : d(internal::make_unique(valueIn)) {} + : d(std::make_unique(valueIn)) {} // --------------------------------------------------------------------------- @@ -1168,7 +1168,7 @@ WKTNodeNNPtr WKTNode::createFrom(const std::string &wkt, size_t indexStart, } } - auto node = NN_NO_CHECK(internal::make_unique(value)); + auto node = NN_NO_CHECK(std::make_unique(value)); if (indexStart > 0) { if (wkt[i] == ',') { @@ -1470,7 +1470,7 @@ struct WKTParser::Private { // --------------------------------------------------------------------------- -WKTParser::WKTParser() : d(internal::make_unique()) {} +WKTParser::WKTParser() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -1704,7 +1704,7 @@ PropertyMap &WKTParser::Private::buildProperties(const WKTNodeNNPtr &node, if (properties_.size() >= MAX_PROPERTY_SIZE) { throw ParsingException("MAX_PROPERTY_SIZE reached"); } - properties_.push_back(internal::make_unique()); + properties_.push_back(std::make_unique()); auto properties = properties_.back().get(); std::string authNameFromAlias; @@ -8579,7 +8579,7 @@ struct PROJStringFormatter::Private { //! @cond Doxygen_Suppress PROJStringFormatter::PROJStringFormatter(Convention conventionIn, const DatabaseContextPtr &dbContext) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->convention_ = conventionIn; d->dbContext_ = dbContext; } @@ -10537,7 +10537,7 @@ struct PROJStringParser::Private { // --------------------------------------------------------------------------- -PROJStringParser::PROJStringParser() : d(internal::make_unique()) {} +PROJStringParser::PROJStringParser() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -12774,7 +12774,7 @@ JSONFormatter &JSONFormatter::setSchema(const std::string &schema) noexcept { //! @cond Doxygen_Suppress -JSONFormatter::JSONFormatter() : d(internal::make_unique()) {} +JSONFormatter::JSONFormatter() : d(std::make_unique()) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/metadata.cpp b/src/iso19111/metadata.cpp index 0c51aafd54..998ef863a5 100644 --- a/src/iso19111/metadata.cpp +++ b/src/iso19111/metadata.cpp @@ -78,14 +78,14 @@ struct Citation::Private { // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress -Citation::Citation() : d(internal::make_unique()) {} +Citation::Citation() : d(std::make_unique()) {} //! @endcond // --------------------------------------------------------------------------- /** \brief Constructs a citation by its title. */ Citation::Citation(const std::string &titleIn) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->title = titleIn; } @@ -93,7 +93,7 @@ Citation::Citation(const std::string &titleIn) //! @cond Doxygen_Suppress Citation::Citation(const Citation &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -124,7 +124,7 @@ struct GeographicExtent::Private {}; // --------------------------------------------------------------------------- -GeographicExtent::GeographicExtent() : d(internal::make_unique()) {} +GeographicExtent::GeographicExtent() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -155,7 +155,7 @@ struct GeographicBoundingBox::Private { GeographicBoundingBox::GeographicBoundingBox(double west, double south, double east, double north) : GeographicExtent(), - d(internal::make_unique(west, south, east, north)) {} + d(std::make_unique(west, south, east, north)) {} // --------------------------------------------------------------------------- @@ -438,15 +438,15 @@ GeographicBoundingBox::Private::intersection(const Private &otherExtent) const { // Check world coverage of this bbox, and other bbox overlapping // antimeridian (e.g. oW=175 and oE=-175) if (W == -180.0 && E == 180.0 && oW > oE) { - return internal::make_unique(oW, std::max(S, oS), oE, - std::min(N, oN)); + return std::make_unique(oW, std::max(S, oS), oE, + std::min(N, oN)); } // Check world coverage of other bbox, and this bbox overlapping // antimeridian (e.g. W=175 and E=-175) if (oW == -180.0 && oE == 180.0 && W > E) { - return internal::make_unique(W, std::max(S, oS), E, - std::min(N, oN)); + return std::make_unique(W, std::max(S, oS), E, + std::min(N, oN)); } // Normal bounding box ? @@ -455,8 +455,8 @@ GeographicBoundingBox::Private::intersection(const Private &otherExtent) const { const double resW = std::max(W, oW); const double resE = std::min(E, oE); if (resW < resE) { - return internal::make_unique(resW, std::max(S, oS), - resE, std::min(N, oN)); + return std::make_unique(resW, std::max(S, oS), resE, + std::min(N, oN)); } return nullptr; } @@ -487,8 +487,8 @@ GeographicBoundingBox::Private::intersection(const Private &otherExtent) const { return otherExtent.intersection(*this); } - return internal::make_unique(std::max(W, oW), std::max(S, oS), - std::min(E, oE), std::min(N, oN)); + return std::make_unique(std::max(W, oW), std::max(S, oS), + std::min(E, oE), std::min(N, oN)); } } //! @endcond @@ -511,7 +511,7 @@ struct VerticalExtent::Private { VerticalExtent::VerticalExtent(double minimumIn, double maximumIn, const common::UnitOfMeasureNNPtr &unitIn) - : d(internal::make_unique(minimumIn, maximumIn, unitIn)) {} + : d(std::make_unique(minimumIn, maximumIn, unitIn)) {} // --------------------------------------------------------------------------- @@ -608,7 +608,7 @@ struct TemporalExtent::Private { TemporalExtent::TemporalExtent(const std::string &startIn, const std::string &stopIn) - : d(internal::make_unique(startIn, stopIn)) {} + : d(std::make_unique(startIn, stopIn)) {} // --------------------------------------------------------------------------- @@ -684,12 +684,11 @@ struct Extent::Private { // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress -Extent::Extent() : d(internal::make_unique()) {} +Extent::Extent() : d(std::make_unique()) {} // --------------------------------------------------------------------------- -Extent::Extent(const Extent &other) - : d(internal::make_unique(*other.d)) {} +Extent::Extent(const Extent &other) : d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -991,7 +990,7 @@ void Identifier::Private::setProperties( Identifier::Identifier(const std::string &codeIn, const util::PropertyMap &properties) - : d(internal::make_unique(codeIn, properties)) {} + : d(std::make_unique(codeIn, properties)) {} // --------------------------------------------------------------------------- @@ -999,12 +998,12 @@ Identifier::Identifier(const std::string &codeIn, // --------------------------------------------------------------------------- -Identifier::Identifier() : d(internal::make_unique()) {} +Identifier::Identifier() : d(std::make_unique()) {} // --------------------------------------------------------------------------- Identifier::Identifier(const Identifier &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- @@ -1511,7 +1510,7 @@ struct PositionalAccuracy::Private { // --------------------------------------------------------------------------- PositionalAccuracy::PositionalAccuracy(const std::string &valueIn) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->value_ = valueIn; } diff --git a/src/iso19111/operation/concatenatedoperation.cpp b/src/iso19111/operation/concatenatedoperation.cpp index c003a0456c..112ed75878 100644 --- a/src/iso19111/operation/concatenatedoperation.cpp +++ b/src/iso19111/operation/concatenatedoperation.cpp @@ -92,15 +92,14 @@ ConcatenatedOperation::~ConcatenatedOperation() = default; //! @cond Doxygen_Suppress ConcatenatedOperation::ConcatenatedOperation(const ConcatenatedOperation &other) - : CoordinateOperation(other), - d(internal::make_unique(*(other.d))) {} + : CoordinateOperation(other), d(std::make_unique(*(other.d))) {} //! @endcond // --------------------------------------------------------------------------- ConcatenatedOperation::ConcatenatedOperation( const std::vector &operationsIn) - : CoordinateOperation(), d(internal::make_unique(operationsIn)) { + : CoordinateOperation(), d(std::make_unique(operationsIn)) { for (const auto &op : operationsIn) { if (op->requiresPerCoordinateInputTime()) { setRequiresPerCoordinateInputTime(true); diff --git a/src/iso19111/operation/coordinateoperation_private.hpp b/src/iso19111/operation/coordinateoperation_private.hpp index dd11a21d94..a2eaddb704 100644 --- a/src/iso19111/operation/coordinateoperation_private.hpp +++ b/src/iso19111/operation/coordinateoperation_private.hpp @@ -76,9 +76,9 @@ struct CoordinateOperation::Private { hasBallparkTransformation_(other.hasBallparkTransformation_), requiresPerCoordinateInputTime_( other.requiresPerCoordinateInputTime_), - strongRef_(other.strongRef_ ? internal::make_unique( - *(other.strongRef_)) - : nullptr) {} + strongRef_(other.strongRef_ + ? std::make_unique(*(other.strongRef_)) + : nullptr) {} Private &operator=(const Private &) = delete; }; diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index 869470fb51..b36dcd5e04 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -199,13 +199,13 @@ CoordinateOperationContext::~CoordinateOperationContext() = default; // --------------------------------------------------------------------------- CoordinateOperationContext::CoordinateOperationContext() - : d(internal::make_unique()) {} + : d(std::make_unique()) {} // --------------------------------------------------------------------------- CoordinateOperationContext::CoordinateOperationContext( const CoordinateOperationContext &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/operation/parametervalue.cpp b/src/iso19111/operation/parametervalue.cpp index 33f907fe7c..c1e4fc711c 100644 --- a/src/iso19111/operation/parametervalue.cpp +++ b/src/iso19111/operation/parametervalue.cpp @@ -61,11 +61,11 @@ struct ParameterValue::Private { explicit Private(const common::Measure &valueIn) : type_(ParameterValue::Type::MEASURE), - measure_(internal::make_unique(valueIn)) {} + measure_(std::make_unique(valueIn)) {} Private(const std::string &stringValueIn, ParameterValue::Type typeIn) : type_(typeIn), - stringValue_(internal::make_unique(stringValueIn)) {} + stringValue_(std::make_unique(stringValueIn)) {} explicit Private(int integerValueIn) : type_(ParameterValue::Type::INTEGER), integerValue_(integerValueIn) {} @@ -84,23 +84,23 @@ ParameterValue::~ParameterValue() = default; // --------------------------------------------------------------------------- ParameterValue::ParameterValue(const common::Measure &measureIn) - : d(internal::make_unique(measureIn)) {} + : d(std::make_unique(measureIn)) {} // --------------------------------------------------------------------------- ParameterValue::ParameterValue(const std::string &stringValueIn, ParameterValue::Type typeIn) - : d(internal::make_unique(stringValueIn, typeIn)) {} + : d(std::make_unique(stringValueIn, typeIn)) {} // --------------------------------------------------------------------------- ParameterValue::ParameterValue(int integerValueIn) - : d(internal::make_unique(integerValueIn)) {} + : d(std::make_unique(integerValueIn)) {} // --------------------------------------------------------------------------- ParameterValue::ParameterValue(bool booleanValueIn) - : d(internal::make_unique(booleanValueIn)) {} + : d(std::make_unique(booleanValueIn)) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/operation/singleoperation.cpp b/src/iso19111/operation/singleoperation.cpp index 48fee7090b..fc13b4bd28 100644 --- a/src/iso19111/operation/singleoperation.cpp +++ b/src/iso19111/operation/singleoperation.cpp @@ -112,13 +112,12 @@ GridDescription::GridDescription(GridDescription &&other) noexcept // --------------------------------------------------------------------------- -CoordinateOperation::CoordinateOperation() - : d(internal::make_unique()) {} +CoordinateOperation::CoordinateOperation() : d(std::make_unique()) {} // --------------------------------------------------------------------------- CoordinateOperation::CoordinateOperation(const CoordinateOperation &other) - : ObjectUsage(other), d(internal::make_unique(*other.d)) {} + : ObjectUsage(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -229,7 +228,7 @@ void CoordinateOperation::setCRSs(const crs::CRSNNPtr &sourceCRSIn, const crs::CRSNNPtr &targetCRSIn, const crs::CRSPtr &interpolationCRSIn) { d->strongRef_ = - internal::make_unique(sourceCRSIn, targetCRSIn); + std::make_unique(sourceCRSIn, targetCRSIn); d->sourceCRSWeak_ = sourceCRSIn.as_nullable(); d->targetCRSWeak_ = targetCRSIn.as_nullable(); d->interpolationCRS_ = interpolationCRSIn; @@ -479,7 +478,7 @@ struct CoordinateTransformer::Private { // --------------------------------------------------------------------------- CoordinateTransformer::CoordinateTransformer() - : d(internal::make_unique()) {} + : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -559,12 +558,12 @@ PJ_COORD CoordinateTransformer::transform(PJ_COORD coord) { // --------------------------------------------------------------------------- -OperationMethod::OperationMethod() : d(internal::make_unique()) {} +OperationMethod::OperationMethod() : d(std::make_unique()) {} // --------------------------------------------------------------------------- OperationMethod::OperationMethod(const OperationMethod &other) - : IdentifiedObject(other), d(internal::make_unique(*other.d)) {} + : IdentifiedObject(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -821,8 +820,7 @@ struct OperationParameterValue::Private { OperationParameterValue::OperationParameterValue( const OperationParameterValue &other) - : GeneralParameterValue(other), - d(internal::make_unique(*other.d)) {} + : GeneralParameterValue(other), d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -830,7 +828,7 @@ OperationParameterValue::OperationParameterValue( const OperationParameterNNPtr ¶meterIn, const ParameterValueNNPtr &valueIn) : GeneralParameterValue(), - d(internal::make_unique(parameterIn, valueIn)) {} + d(std::make_unique(parameterIn, valueIn)) {} // --------------------------------------------------------------------------- @@ -1204,7 +1202,7 @@ struct SingleOperation::Private { // --------------------------------------------------------------------------- SingleOperation::SingleOperation(const OperationMethodNNPtr &methodIn) - : d(internal::make_unique(methodIn)) { + : d(std::make_unique(methodIn)) { const int methodEPSGCode = d->method_->getEPSGCode(); const auto &methodName = d->method_->nameStr(); @@ -1231,7 +1229,7 @@ SingleOperation::SingleOperation(const SingleOperation &other) #if !defined(COMPILER_WARNS_ABOUT_ABSTRACT_VBASE_INIT) CoordinateOperation(other), #endif - d(internal::make_unique(*other.d)) { + d(std::make_unique(*other.d)) { } // --------------------------------------------------------------------------- diff --git a/src/iso19111/operation/transformation.cpp b/src/iso19111/operation/transformation.cpp index ab3af1f99b..4ed5198a84 100644 --- a/src/iso19111/operation/transformation.cpp +++ b/src/iso19111/operation/transformation.cpp @@ -91,7 +91,7 @@ Transformation::Transformation( const crs::CRSPtr &interpolationCRSIn, const OperationMethodNNPtr &methodIn, const std::vector &values, const std::vector &accuracies) - : SingleOperation(methodIn), d(internal::make_unique()) { + : SingleOperation(methodIn), d(std::make_unique()) { setParameterValues(values); setCRSs(sourceCRSIn, targetCRSIn, interpolationCRSIn); setAccuracies(accuracies); @@ -107,7 +107,7 @@ Transformation::~Transformation() = default; Transformation::Transformation(const Transformation &other) : CoordinateOperation(other), SingleOperation(other), - d(internal::make_unique(*other.d)) {} + d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- diff --git a/src/iso19111/util.cpp b/src/iso19111/util.cpp index e72f3af7b0..8d1fa36ba9 100644 --- a/src/iso19111/util.cpp +++ b/src/iso19111/util.cpp @@ -67,7 +67,7 @@ struct BaseObject::Private { // --------------------------------------------------------------------------- -BaseObject::BaseObject() : d(internal::make_unique()) {} +BaseObject::BaseObject() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -133,14 +133,14 @@ struct BoxedValue::Private { // --------------------------------------------------------------------------- -BoxedValue::BoxedValue() : d(internal::make_unique(std::string())) {} +BoxedValue::BoxedValue() : d(std::make_unique(std::string())) {} // --------------------------------------------------------------------------- /** \brief Constructs a BoxedValue from a string. */ BoxedValue::BoxedValue(const char *stringValueIn) - : d(internal::make_unique( + : d(std::make_unique( std::string(stringValueIn ? stringValueIn : ""))) {} // --------------------------------------------------------------------------- @@ -148,27 +148,27 @@ BoxedValue::BoxedValue(const char *stringValueIn) /** \brief Constructs a BoxedValue from a string. */ BoxedValue::BoxedValue(const std::string &stringValueIn) - : d(internal::make_unique(stringValueIn)) {} + : d(std::make_unique(stringValueIn)) {} // --------------------------------------------------------------------------- /** \brief Constructs a BoxedValue from an integer. */ BoxedValue::BoxedValue(int integerValueIn) - : d(internal::make_unique(integerValueIn)) {} + : d(std::make_unique(integerValueIn)) {} // --------------------------------------------------------------------------- /** \brief Constructs a BoxedValue from a boolean. */ BoxedValue::BoxedValue(bool booleanValueIn) - : d(internal::make_unique(booleanValueIn)) {} + : d(std::make_unique(booleanValueIn)) {} // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress BoxedValue::BoxedValue(const BoxedValue &other) - : d(internal::make_unique(*other.d)) {} + : d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -201,7 +201,7 @@ struct ArrayOfBaseObject::Private { // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress -ArrayOfBaseObject::ArrayOfBaseObject() : d(internal::make_unique()) {} +ArrayOfBaseObject::ArrayOfBaseObject() : d(std::make_unique()) {} // --------------------------------------------------------------------------- @@ -267,13 +267,13 @@ struct PropertyMap::Private { // --------------------------------------------------------------------------- -PropertyMap::PropertyMap() : d(internal::make_unique()) {} +PropertyMap::PropertyMap() : d(std::make_unique()) {} // --------------------------------------------------------------------------- //! @cond Doxygen_Suppress PropertyMap::PropertyMap(const PropertyMap &other) - : d(internal::make_unique(*(other.d))) {} + : d(std::make_unique(*(other.d))) {} //! @endcond // --------------------------------------------------------------------------- @@ -418,12 +418,12 @@ struct GenericName::Private {}; // --------------------------------------------------------------------------- -GenericName::GenericName() : d(internal::make_unique()) {} +GenericName::GenericName() : d(std::make_unique()) {} // --------------------------------------------------------------------------- GenericName::GenericName(const GenericName &other) - : d(internal::make_unique(*other.d)) {} + : d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -445,14 +445,14 @@ struct NameSpace::Private { // --------------------------------------------------------------------------- NameSpace::NameSpace(const GenericNamePtr &nameIn) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->name = nameIn; } // --------------------------------------------------------------------------- NameSpace::NameSpace(const NameSpace &other) - : d(internal::make_unique(*other.d)) {} + : d(std::make_unique(*other.d)) {} // --------------------------------------------------------------------------- @@ -503,15 +503,14 @@ struct LocalName::Private { // --------------------------------------------------------------------------- -LocalName::LocalName(const std::string &name) - : d(internal::make_unique()) { +LocalName::LocalName(const std::string &name) : d(std::make_unique()) { d->name = name; } // --------------------------------------------------------------------------- LocalName::LocalName(const NameSpacePtr &ns, const std::string &name) - : d(internal::make_unique()) { + : d(std::make_unique()) { d->scope = ns ? ns : static_cast(NameSpace::GLOBAL); d->name = name; } @@ -519,7 +518,7 @@ LocalName::LocalName(const NameSpacePtr &ns, const std::string &name) // --------------------------------------------------------------------------- LocalName::LocalName(const LocalName &other) - : GenericName(other), d(internal::make_unique(*other.d)) {} + : GenericName(other), d(std::make_unique(*other.d)) {} // ---------------------------------------------------------------------------