From e8e62adbb5ab2fead273e8696da322ecbd6dd5a3 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Fri, 22 May 2015 23:09:03 +0200 Subject: [PATCH] Retrieve reference to background instead of making a copy. --- inst/cta/src/GCTAModelCubeBackground.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inst/cta/src/GCTAModelCubeBackground.cpp b/inst/cta/src/GCTAModelCubeBackground.cpp index d3e44e4..f2b65bc 100644 --- a/inst/cta/src/GCTAModelCubeBackground.cpp +++ b/inst/cta/src/GCTAModelCubeBackground.cpp @@ -280,8 +280,8 @@ double GCTAModelCubeBackground::eval(const GEvent& event, throw GException::invalid_argument(G_EVAL, msg); } - // Retrieve pointer to CTA cube background - const GCTACubeBackground bgd = rsp->background(); + // Retrieve reference to CTA cube background + const GCTACubeBackground& bgd = rsp->background(); // Evaluate function double logE = event.energy().log10TeV(); @@ -338,8 +338,8 @@ double GCTAModelCubeBackground::eval_gradients(const GEvent& event, throw GException::invalid_argument(G_EVAL_GRADIENTS, msg); } - // Retrieve pointer to CTA cube background - const GCTACubeBackground bgd = rsp->background(); + // Retrieve reference to CTA cube background + const GCTACubeBackground& bgd = rsp->background(); // Evaluate function double logE = event.energy().log10TeV(); -- libgit2 0.21.4