From 50142e318966e9a31099026296a29180ea9bf46f Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Tue, 20 Nov 2012 08:45:48 -0500 Subject: [PATCH] Changed programming interface of newSpectrumRaw --- src/fourier/base_types.hpp | 2 +- src/fourier/details/healpix_utility.hpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/fourier/base_types.hpp b/src/fourier/base_types.hpp index 5e93e48..936bc83 100644 --- a/src/fourier/base_types.hpp +++ b/src/fourier/base_types.hpp @@ -160,7 +160,7 @@ namespace CosmoTool virtual Spectrum_ptr estimateSpectrumFromMap(const FMap& m) const = 0; virtual Spectrum_ptr newSpectrumFromRaw(T *data, long size, - Spectrum_ptr like_spec) const = 0; + const Spectrum& like_spec) const = 0; }; }; diff --git a/src/fourier/details/healpix_utility.hpp b/src/fourier/details/healpix_utility.hpp index 004208b..d989dd8 100644 --- a/src/fourier/details/healpix_utility.hpp +++ b/src/fourier/details/healpix_utility.hpp @@ -46,10 +46,9 @@ namespace CosmoTool } Spectrum_ptr newSpectrumFromRaw(T *data, long size, - Spectrum_ptr like_spec) const + const Spectrum& like_spec) const { - Spectrum *s = like_spec.get(); - HealpixSpectrum& in_spec = dynamic_cast&>(*s); + const HealpixSpectrum& in_spec = dynamic_cast&>(like_spec); HealpixSpectrum *new_spectrum = new HealpixSpectrum(in_spec.Lmax()); T *out_d = new_spectrum->data();