]> sigrok.org Git - pulseview.git/blobdiff - pv/data/analog.cpp
Replaced boost::shared_ptr with std::shared_ptr
[pulseview.git] / pv / data / analog.cpp
index 6e2f2db8413a2b9917f246aa59ad539dda574f29..53fa9a5a62b117c5a1258cdc09dd05d1fc1cf446 100644 (file)
@@ -21,8 +21,9 @@
 #include "analog.h"
 #include "analogsnapshot.h"
 
-using namespace boost;
-using namespace std;
+using std::deque;
+using std::max;
+using std::shared_ptr;
 
 namespace pv {
 namespace data {
@@ -47,5 +48,15 @@ void Analog::clear()
        _snapshots.clear();
 }
 
+uint64_t Analog::get_max_sample_count() const
+{
+       uint64_t l = 0;
+       for (const std::shared_ptr<AnalogSnapshot> s : _snapshots) {
+               assert(s);
+               l = max(l, s->get_sample_count());
+       }
+       return l;
+}
+
 } // namespace data
 } // namespace pv