Corrected project name in header comments
[pulseview.git] / logicdata.cpp
index 1c6aa59e1d5fc463912ca4d4311ec7adc9a4cfcb..73d35d71a7f1cc753647c8a3e9c3912062191148 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * This file is part of the sigrok project.
+ * This file is part of the PulseView project.
  *
  * Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
  *
@@ -25,7 +25,7 @@ using namespace boost;
 using namespace std;
 
 LogicData::LogicData(const sr_datafeed_meta_logic &meta) :
-       SignalData(meta.samplerate),
+       SignalData(meta.samplerate > 0 ? meta.samplerate : 1),
        _num_probes(meta.num_probes)
 {
 }
@@ -38,10 +38,10 @@ int LogicData::get_num_probes() const
 void LogicData::push_snapshot(
        boost::shared_ptr<LogicDataSnapshot> &snapshot)
 {
-       _snapshots.push(snapshot);
+       _snapshots.push_front(snapshot);
 }
 
-queue< shared_ptr<LogicDataSnapshot> >& LogicData::get_snapshots()
+deque< shared_ptr<LogicDataSnapshot> >& LogicData::get_snapshots()
 {
        return _snapshots;
 }