diff --git a/src/io/pibinarylog.cpp b/src/io/pibinarylog.cpp index 7d14ba9d..61847458 100644 --- a/src/io/pibinarylog.cpp +++ b/src/io/pibinarylog.cpp @@ -142,7 +142,7 @@ bool PIBinaryLog::threadedRead(uchar *readed, int size) { break; case PlayVariableSpeed: delay = lastrecord.timestamp.toMilliseconds() - play_time; - piCoutObj << "delay" << delay; + //piCoutObj << "delay" << delay; double cdelay; int dtc; if (is_started) { diff --git a/src/math/pimathvector.h b/src/math/pimathvector.h index 8330c6dc..6e5667d1 100644 --- a/src/math/pimathvector.h +++ b/src/math/pimathvector.h @@ -38,11 +38,11 @@ template class PIP_EXPORT PIMathVectorT { typedef PIMathVectorT _CVector; public: - PIMathVectorT() {resize(Size);} + PIMathVectorT() {resize();} //PIMathVectorT(Type val) {resize(Size); PIMV_FOR(i, 0) c[i] = val;} - PIMathVectorT(Type fval, ...) {resize(Size); c[0] = fval; va_list vl; va_start(vl, fval); PIMV_FOR(i, 1) c[i] = va_arg(vl, Type); va_end(vl);} - PIMathVectorT(const PIVector & val) {resize(Size); PIMV_FOR(i, 0) c[i] = val[i];} - PIMathVectorT(const _CVector & st, const _CVector & fn) {resize(Size); set(st, fn);} + PIMathVectorT(Type fval, ...) {resize(); c[0] = fval; va_list vl; va_start(vl, fval); PIMV_FOR(i, 1) c[i] = va_arg(vl, Type); va_end(vl);} + PIMathVectorT(const PIVector & val) {resize(); PIMV_FOR(i, 0) c[i] = val[i];} + PIMathVectorT(const _CVector & st, const _CVector & fn) {resize(); set(st, fn);} uint size() const {return Size;} _CVector & fill(const Type & v) {PIMV_FOR(i, 0) c[i] = v; return *this;} @@ -107,9 +107,8 @@ public: PIMathVectorT turnTo() {PIMathVectorT tv; uint sz = piMin(Size, Size1); for (uint i = 0; i < sz; ++i) tv[i] = c[i]; return tv;} private: - void resize(uint size, const Type & new_value = Type()) {s = size; for (int i = 0; i < s; ++i) c[i] = new_value;} + void resize(const Type & new_value = Type()) {for (int i = 0; i < Size; ++i) c[i] = new_value;} - int s; Type c[Size]; };