comparison data/model/DenseTimeValueModel.cpp @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents e802e550a1f2
children cc27f35aa75c
comparison
equal deleted inserted replaced
928:6a94bb528e9d 929:59e7fe1b1003
27 { 27 {
28 PlayParameterRepository::getInstance()->removePlayable(this); 28 PlayParameterRepository::getInstance()->removePlayable(this);
29 } 29 }
30 30
31 QString 31 QString
32 DenseTimeValueModel::toDelimitedDataString(QString delimiter, size_t f0, size_t f1) const 32 DenseTimeValueModel::toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const
33 { 33 {
34 size_t ch = getChannelCount(); 34 int ch = getChannelCount();
35 35
36 cerr << "f0 = " << f0 << ", f1 = " << f1 << endl; 36 cerr << "f0 = " << f0 << ", f1 = " << f1 << endl;
37 37
38 if (f1 <= f0) return ""; 38 if (f1 <= f0) return "";
39 39
40 float **all = new float *[ch]; 40 float **all = new float *[ch];
41 for (size_t c = 0; c < ch; ++c) { 41 for (int c = 0; c < ch; ++c) {
42 all[c] = new float[f1 - f0]; 42 all[c] = new float[f1 - f0];
43 } 43 }
44 44
45 size_t n = getData(0, ch - 1, f0, f1 - f0, all); 45 int n = getData(0, ch - 1, f0, f1 - f0, all);
46 46
47 QStringList list; 47 QStringList list;
48 for (size_t i = 0; i < n; ++i) { 48 for (int i = 0; i < n; ++i) {
49 QStringList parts; 49 QStringList parts;
50 parts << QString("%1").arg(f0 + i); 50 parts << QString("%1").arg(f0 + i);
51 for (size_t c = 0; c < ch; ++c) { 51 for (int c = 0; c < ch; ++c) {
52 parts << QString("%1").arg(all[c][i]); 52 parts << QString("%1").arg(all[c][i]);
53 } 53 }
54 list << parts.join(delimiter); 54 list << parts.join(delimiter);
55 } 55 }
56 56
57 for (size_t c = 0; c < ch; ++c) { 57 for (int c = 0; c < ch; ++c) {
58 delete[] all[c]; 58 delete[] all[c];
59 } 59 }
60 delete[] all; 60 delete[] all;
61 61
62 return list.join("\n"); 62 return list.join("\n");