[Git][debian-gis-team/libcitygml][upstream] New upstream version 2.4.3

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Mon Jun 27 14:58:11 BST 2022



Bas Couwenberg pushed to branch upstream at Debian GIS Project / libcitygml


Commits:
58e63403 by Bas Couwenberg at 2022-06-27T15:17:28+02:00
New upstream version 2.4.3
- - - - -


4 changed files:

- sources/include/citygml/citygmlfactory.h
- sources/include/parser/externalreferenceparser.h
- sources/src/citygml/citygmlfactory.cpp
- sources/src/parser/externalreferenceparser.cpp


Changes:

=====================================
sources/include/citygml/citygmlfactory.h
=====================================
@@ -41,7 +41,7 @@ namespace citygml {
 
         std::shared_ptr<Polygon> createPolygon(const std::string& id);
         std::shared_ptr<LineString> createLineString(const std::string& id);
-        std::shared_ptr<ExternalReference> createExternalReference(const std::string& id);
+        ExternalReference* createExternalReference(const std::string& id);
 
         /**
          * @brief requests a polygon for a Geometry object that will be added later


=====================================
sources/include/parser/externalreferenceparser.h
=====================================
@@ -25,7 +25,7 @@ namespace citygml {
         virtual Object* getObject() override;
         
     private:
-        std::shared_ptr<ExternalReference> model;
+        std::unique_ptr<ExternalReference> model;
         std::function<void(ExternalReference *)> callback;
     };
 }


=====================================
sources/src/citygml/citygmlfactory.cpp
=====================================
@@ -95,10 +95,9 @@ namespace citygml {
         return std::shared_ptr<LineString>(lineString);
     }
 
-    std::shared_ptr<ExternalReference> CityGMLFactory::createExternalReference(const std::string& id)
+    ExternalReference* CityGMLFactory::createExternalReference(const std::string& id)
     {
-        ExternalReference * externalReference = new ExternalReference(id);
-        return std::shared_ptr<ExternalReference>(externalReference);
+        return new ExternalReference(id);
     }
 
     void CityGMLFactory::requestSharedPolygonForGeometry(Geometry* geom, const std::string& polygonId)


=====================================
sources/src/parser/externalreferenceparser.cpp
=====================================
@@ -25,13 +25,13 @@ namespace citygml {
             CITYGML_LOG_ERROR(m_logger, "Expected start tag <" << NodeType::CORE_ExternalReferenceNode << "> but got <" << node.name() << "> at " << getDocumentLocation());
         }
         
-        model = m_factory.createExternalReference(attributes.getCityGMLIDAttribute());
+        model.reset(m_factory.createExternalReference(attributes.getCityGMLIDAttribute()));
         
         return true;
     }
 
     bool ExternalReferenceParser::parseElementEndTag(NodeType::XMLNode const& node, std::string const&) {
-        callback(model.get());
+        callback(model.release());
         return true;
     }
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/libcitygml/-/commit/58e634037f631fbefcb93addd5558993c67afe83

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/libcitygml/-/commit/58e634037f631fbefcb93addd5558993c67afe83
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220627/7fa39e5f/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list