From de054658efab57f097425d98bdb3294254d21b5f Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Wed, 11 Aug 2010 18:48:23 +0200 Subject: [PATCH] avoid vector copy operation --- FDTD/processing.cpp | 6 +++--- FDTD/processing.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FDTD/processing.cpp b/FDTD/processing.cpp index 90b4faf..6284718 100644 --- a/FDTD/processing.cpp +++ b/FDTD/processing.cpp @@ -133,11 +133,11 @@ void Processing::AddFrequency(double freq) m_FD_Samples.push_back(freq); } -void Processing::AddFrequency(vector freqs) +void Processing::AddFrequency(vector *freqs) { - for (size_t n=0;nsize();++n) { - AddFrequency(freqs.at(n)); + AddFrequency(freqs->at(n)); } } diff --git a/FDTD/processing.h b/FDTD/processing.h index 5908279..15cb688 100644 --- a/FDTD/processing.h +++ b/FDTD/processing.h @@ -45,7 +45,7 @@ public: void AddSteps(vector steps); void AddFrequency(double freq); - void AddFrequency(vector freqs); + void AddFrequency(vector *freqs); bool CheckTimestep(); virtual int Process() {return GetNextInterval();}