Also changes the type for the getters to uint32_t.
segments_.begin(), segments_.end());
}
-int Analog::get_segment_count() const
+uint32_t Analog::get_segment_count() const
{
- return segments_.size();
+ return (uint32_t)segments_.size();
}
void Analog::clear()
vector< shared_ptr<Segment> > segments() const;
- int get_segment_count() const;
+ uint32_t get_segment_count() const;
void clear();
return vector< shared_ptr<Segment> >(segments_.begin(), segments_.end());
}
-int Logic::get_segment_count() const
+uint32_t Logic::get_segment_count() const
{
- return segments_.size();
+ return (uint32_t)segments_.size();
}
void Logic::clear()
vector< shared_ptr<Segment> > segments() const;
- int get_segment_count() const;
+ uint32_t get_segment_count() const;
void clear();
public:
virtual vector< shared_ptr<Segment> > segments() const = 0;
- virtual int get_segment_count() const = 0;
+ virtual uint32_t get_segment_count() const = 0;
virtual void clear() = 0;
return samplerate;
}
-int Session::get_segment_count() const
+uint32_t Session::get_segment_count() const
{
- int min_val = INT_MAX;
+ uint32_t value = 0;
- // Find the lowest common number of segments
+ // Find the highest number of segments
for (shared_ptr<data::SignalData> data : all_signal_data_)
- if (data->get_segment_count() < min_val)
- min_val = data->get_segment_count();
+ if (data->get_segment_count() > value)
+ value = data->get_segment_count();
- return (min_val != INT_MAX) ? min_val : 0;
+ return value;
}
const unordered_set< shared_ptr<data::SignalBase> > Session::signalbases() const
double get_samplerate() const;
- int get_segment_count() const;
+ uint32_t get_segment_count() const;
void register_view(shared_ptr<views::ViewBase> view);