Commit e52a0d64ee5822fde973ef70ad49ed57b8341a96

Authored by Jürgen Knödlseder
1 parent 14a7df8e

GModels now returns pointer, not reference.

Showing 1 changed file with 2 additions and 2 deletions
src/ctobssim/ctobssim.cpp
... ... @@ -690,7 +690,7 @@ void ctobssim::simulate_source(GCTAObservation* obs, const GModels& models,
690 690  
691 691 // Get sky model (NULL if not a sky model)
692 692 const GModelSky* model =
693   - dynamic_cast<const GModelSky*>(&models[i]);
  693 + dynamic_cast<const GModelSky*>(models[i]);
694 694  
695 695 // If we have a sky model then simulate photons
696 696 if (model != NULL) {
... ... @@ -868,7 +868,7 @@ void ctobssim::simulate_background(GCTAObservation* obs,
868 868  
869 869 // Get model (NULL if not a radial acceptance model)
870 870 const GCTAModelRadialAcceptance* model =
871   - dynamic_cast<const GCTAModelRadialAcceptance*>(&models[i]);
  871 + dynamic_cast<const GCTAModelRadialAcceptance*>(models[i]);
872 872  
873 873 // If we have a radial acceptance model then simulate events
874 874 if (model != NULL) {
... ...