comparison runner/DefaultFeatureWriter.cpp @ 138:ee56e3e9eeb5

Add -Werror in debug mode, and fix errors resulting from it
author Chris Cannam
date Mon, 13 Oct 2014 11:42:54 +0100
parents 92911f967a16
children b3d73c08b6ce
comparison
equal deleted inserted replaced
135:caf05503bf42 138:ee56e3e9eeb5
18 18
19 using namespace std; 19 using namespace std;
20 20
21 #include "DefaultFeatureWriter.h" 21 #include "DefaultFeatureWriter.h"
22 22
23 void DefaultFeatureWriter::write(QString trackid, 23 void DefaultFeatureWriter::write(QString,
24 const Transform &transform, 24 const Transform &,
25 const Vamp::Plugin::OutputDescriptor& output, 25 const Vamp::Plugin::OutputDescriptor& output,
26 const Vamp::Plugin::FeatureList& featureList, 26 const Vamp::Plugin::FeatureList& featureList,
27 std::string summaryType) 27 std::string summaryType)
28 { 28 {
29 // generic XML output 29 // generic XML output
37 <label>feature.label</label> 37 <label>feature.label</label>
38 </feature> 38 </feature>
39 39
40 */ 40 */
41 41
42 for (int i = 0; i < featureList.size(); ++i) 42 for (int i = 0; i < (int)featureList.size(); ++i) {
43 { 43
44 if (summaryType == "") { 44 if (summaryType == "") {
45 cout << "<feature>" << endl; 45 cout << "<feature>" << endl;
46 } else { 46 } else {
47 cout << "<summary type=\"" << summaryType << "\">" << endl; 47 cout << "<summary type=\"" << summaryType << "\">" << endl;
48 } 48 }
54 cout << "\t<duration>" << featureList[i].duration << "</duration>" << endl; 54 cout << "\t<duration>" << featureList[i].duration << "</duration>" << endl;
55 } 55 }
56 if (featureList[i].values.size() > 0) 56 if (featureList[i].values.size() > 0)
57 { 57 {
58 cout << "\t<values>"; 58 cout << "\t<values>";
59 for (int j = 0; j < featureList[i].values.size(); ++j) 59 for (int j = 0; j < (int)featureList[i].values.size(); ++j) {
60 {
61 if (j > 0) 60 if (j > 0)
62 cout << " "; 61 cout << " ";
63 if (output.binNames.size() > 0) 62 if (output.binNames.size() > 0)
64 cout << output.binNames[j] << ":"; 63 cout << output.binNames[j] << ":";
65 cout << featureList[i].values[j]; 64 cout << featureList[i].values[j];