comparison data/model/FFTModel.cpp @ 1319:12a1da4719c7 3.0-integration

Remove unnecessary move()s
author Chris Cannam
date Wed, 07 Dec 2016 13:56:22 +0000
parents 6463046bd21d
children 54af1e21705c
comparison
equal deleted inserted replaced
1318:f830a10bfbd6 1319:12a1da4719c7
100 { 100 {
101 auto cplx = getFFTColumn(x); 101 auto cplx = getFFTColumn(x);
102 Column col; 102 Column col;
103 col.reserve(cplx.size()); 103 col.reserve(cplx.size());
104 for (auto c: cplx) col.push_back(abs(c)); 104 for (auto c: cplx) col.push_back(abs(c));
105 return move(col); 105 return col;
106 } 106 }
107 107
108 FFTModel::Column 108 FFTModel::Column
109 FFTModel::getPhases(int x) const 109 FFTModel::getPhases(int x) const
110 { 110 {
112 Column col; 112 Column col;
113 col.reserve(cplx.size()); 113 col.reserve(cplx.size());
114 for (auto c: cplx) { 114 for (auto c: cplx) {
115 col.push_back(arg(c)); 115 col.push_back(arg(c));
116 } 116 }
117 return move(col); 117 return col;
118 } 118 }
119 119
120 float 120 float
121 FFTModel::getMagnitudeAt(int x, int y) const 121 FFTModel::getMagnitudeAt(int x, int y) const
122 { 122 {
330 if (m_cached.size() >= m_cacheSize) { 330 if (m_cached.size() >= m_cacheSize) {
331 m_cached.pop_front(); 331 m_cached.pop_front();
332 } 332 }
333 m_cached.push_back(sc); 333 m_cached.push_back(sc);
334 334
335 return move(col); 335 return col;
336 } 336 }
337 337
338 bool 338 bool
339 FFTModel::estimateStableFrequency(int x, int y, double &frequency) 339 FFTModel::estimateStableFrequency(int x, int y, double &frequency)
340 { 340 {