Fixes #14349: GeoFeature::getElementTypes causes undefined behaviour

This commit is contained in:
wmayer
2024-05-30 10:17:22 +02:00
committed by wwmayer
parent 0490c0195a
commit 40b6b847eb
2 changed files with 2 additions and 2 deletions

View File

@@ -268,7 +268,7 @@ const std::vector<std::string>& GeoFeature::searchElementCache(const std::string
return none;
}
const std::vector<const char*>& GeoFeature::getElementTypes(bool /*all*/) const
std::vector<const char*> GeoFeature::getElementTypes(bool /*all*/) const
{
static std::vector<const char*> nil;
auto prop = getPropertyOfGeometry();

View File

@@ -177,7 +177,7 @@ public:
virtual DocumentObject *getElementOwner(const Data::MappedName & /*name*/) const
{return nullptr;}
virtual const std::vector<const char *>& getElementTypes(bool all=true) const;
virtual std::vector<const char *> getElementTypes(bool all=true) const;
/// Return the higher level element names of the given element
virtual std::vector<Data::IndexedName> getHigherElements(const char *name, bool silent=false) const;