From c1b41c9d2c4ce72a829d7946c600e1d423496f56 Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Fri, 12 Jan 2024 11:47:12 +0100
Subject: [PATCH] Adapt to ROOT 6.31. See issue
 https://github.com/AIDASoft/DD4hep/issues/1210

---
 DDCore/src/ShapeUtilities.cpp | 8 +++++++-
 DDCore/src/Volumes.cpp        | 3 +--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/DDCore/src/ShapeUtilities.cpp b/DDCore/src/ShapeUtilities.cpp
index 6e5cdd4f0..e8014a2e0 100644
--- a/DDCore/src/ShapeUtilities.cpp
+++ b/DDCore/src/ShapeUtilities.cpp
@@ -433,8 +433,14 @@ namespace dd4hep {
     for(int i=0; i<num_facet; ++i)  {
       const TGeoFacet& f = sh->GetFacet(i);
       pars.emplace_back(double(f.GetNvert()));
-      for(int j=0, n=f.GetNvert(); j<n; ++j)
+      for(int j=0, n=f.GetNvert(); j<n; ++j)   {
+#if ROOT_VERSION_CODE >= ROOT_VERSION(6,31,0)
+	int idx = f[j];
+        pars.emplace_back(double(idx));
+#else
         pars.emplace_back(double(f.GetVertexIndex(j)));
+#endif
+      }
     }
     return pars;
   }
diff --git a/DDCore/src/Volumes.cpp b/DDCore/src/Volumes.cpp
index a46861b83..1b1a88601 100644
--- a/DDCore/src/Volumes.cpp
+++ b/DDCore/src/Volumes.cpp
@@ -361,9 +361,8 @@ PlacedVolumeExtension::PlacedVolumeExtension()
 
 /// Default move
 PlacedVolumeExtension::PlacedVolumeExtension(PlacedVolumeExtension&& c)
-  : TGeoExtension(c), magic(move(c.magic)), refCount(0), volIDs() {
+  : TGeoExtension(c), magic(std::move(c.magic)), refCount(0), volIDs(std::move(c.volIDs)) {
   INCREMENT_COUNTER;
-  volIDs = move(c.volIDs);
 }
 
 /// Copy constructor
-- 
GitLab