From 6777e1bf8e8bbc31b9a91119f95f5fcd60ba6da9 Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Tue, 19 Jul 2022 11:46:56 +0200
Subject: [PATCH] Fixes for Geant4 < 1070

---
 DDG4/include/DDG4/Geant4FastSimSpot.h | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/DDG4/include/DDG4/Geant4FastSimSpot.h b/DDG4/include/DDG4/Geant4FastSimSpot.h
index 901a31360..6d7f8ead2 100644
--- a/DDG4/include/DDG4/Geant4FastSimSpot.h
+++ b/DDG4/include/DDG4/Geant4FastSimSpot.h
@@ -26,10 +26,12 @@
 class G4FastHit
 {
  public:
-  G4FastHit();
-  G4FastHit(const G4ThreeVector& aPosition, G4double aEnergy);
-  G4FastHit(const G4ThreeVector& aPosition, G4double aEnergy, G4bool aDebug);
-  virtual ~G4FastHit(){};
+  G4FastHit() = default;
+  G4FastHit(const G4ThreeVector& aPosition, G4double aEnergy)
+    : fEnergy(aEnergy), fPosition(aPosition) {}
+  G4FastHit(const G4ThreeVector& aPosition, G4double aEnergy, G4bool /* aDebug */);
+    : fEnergy(aEnergy), fPosition(aPosition) {}
+  virtual ~G4FastHit() = default;
 
   /// Set energy
   inline void SetEnergy(const G4double& aEnergy) { fEnergy = aEnergy; }
@@ -44,9 +46,9 @@ class G4FastHit
   inline G4ThreeVector GetPosition() const { return fPosition; }
  private:
   /// energy
-  G4double fEnergy = 0;
+  G4double fEnergy  {0e0};
   /// position
-  G4ThreeVector fPosition = G4ThreeVector();
+  G4ThreeVector fPosition  { };
 };
 #else
 #include <G4FastHit.hh>
-- 
GitLab