Commit 101782c2 authored by Pavel Vainerman's avatar Pavel Vainerman

(DigitalFilter): "заменил" for на "copy" (небольшая оптимизация)

parent f84048e6
......@@ -194,9 +194,10 @@ int DigitalFilter::median( int newval )
add(newval);
FIFOBuffer::iterator it = buf.begin();
for( unsigned int i=0; i<maxsize && it!=buf.end(); i++,it++ )
mvec[i] = (*it);
// FIFOBuffer::iterator it = buf.begin();
// for( unsigned int i=0; i<maxsize && it!=buf.end(); i++,it++ )
// mvec[i] = (*it);
copy(buf.begin(),buf.end(),mvec.begin());
sort(mvec.begin(),mvec.end());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment