comparison dsp/segmentation/Segmenter.cpp @ 414:7e8d1f26b098

Fix compiler warnings with -Wall -Wextra
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 28 Sep 2015 12:33:17 +0100
parents d5014ab8b0e5
children 175e51ae78eb
comparison
equal deleted inserted replaced
413:ec7318974497 414:7e8d1f26b098
16 16
17 #include "Segmenter.h" 17 #include "Segmenter.h"
18 18
19 ostream& operator<<(ostream& os, const Segmentation& s) 19 ostream& operator<<(ostream& os, const Segmentation& s)
20 { 20 {
21 os << "structure_name : begin_time end_time\n"; 21 os << "structure_name : begin_time end_time\n";
22 22
23 for (int i = 0; i < s.segments.size(); i++) 23 for (int i = 0; i < int(s.segments.size()); i++) {
24 { 24 Segment seg = s.segments[i];
25 Segment seg = s.segments[i]; 25 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
26 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate) 26 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
27 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n"; 27 }
28 } 28
29 29 return os;
30 return os;
31 } 30 }