avoid vector copy operation

pull/1/head
Thorsten Liebig 2010-08-11 18:48:23 +02:00
parent c3407c7730
commit de054658ef
2 changed files with 4 additions and 4 deletions

View File

@ -133,11 +133,11 @@ void Processing::AddFrequency(double freq)
m_FD_Samples.push_back(freq); m_FD_Samples.push_back(freq);
} }
void Processing::AddFrequency(vector<double> freqs) void Processing::AddFrequency(vector<double> *freqs)
{ {
for (size_t n=0;n<freqs.size();++n) for (size_t n=0;n<freqs->size();++n)
{ {
AddFrequency(freqs.at(n)); AddFrequency(freqs->at(n));
} }
} }

View File

@ -45,7 +45,7 @@ public:
void AddSteps(vector<unsigned int> steps); void AddSteps(vector<unsigned int> steps);
void AddFrequency(double freq); void AddFrequency(double freq);
void AddFrequency(vector<double> freqs); void AddFrequency(vector<double> *freqs);
bool CheckTimestep(); bool CheckTimestep();
virtual int Process() {return GetNextInterval();} virtual int Process() {return GetNextInterval();}