]> sigrok.org Git - pulseview.git/commitdiff
Session: Removed device parameter from update_signals
authorJoel Holdsworth <redacted>
Fri, 17 Apr 2015 17:23:04 +0000 (18:23 +0100)
committerUwe Hermann <redacted>
Thu, 11 Jun 2015 18:38:47 +0000 (20:38 +0200)
pv/session.cpp
pv/session.hpp

index 542b88b798188696eabc216947065bf5f43c06ce..dd78f4a176088ebb69cc5089558b4d310a7d4415 100644 (file)
@@ -133,7 +133,7 @@ void Session::set_device(shared_ptr<devices::Device> device)
                (shared_ptr<sigrok::Device> device, shared_ptr<Packet> packet) {
                        data_feed_in(device, packet);
                });
-       update_signals(device_);
+       update_signals();
 
        decode_traces_.clear();
 
@@ -301,12 +301,12 @@ void Session::set_capture_state(capture_state state)
                capture_state_changed(state);
 }
 
-void Session::update_signals(shared_ptr<devices::Device> device)
+void Session::update_signals()
 {
-       assert(device);
+       assert(device_);
        assert(capture_state_ == Stopped);
 
-       const shared_ptr<sigrok::Device> sr_dev = device->device();
+       const shared_ptr<sigrok::Device> sr_dev = device_->device();
        if (!sr_dev) {
                signals_.clear();
                logic_data_.reset();
@@ -364,7 +364,7 @@ void Session::update_signals(shared_ptr<devices::Device> device)
                                case SR_CHANNEL_LOGIC:
                                        signal = shared_ptr<view::Signal>(
                                                new view::LogicSignal(*this,
-                                                       device, channel,
+                                                       device_, channel,
                                                        logic_data_));
                                        break;
 
index 69099b445df514658fc4df4fcc6a9ff3b52cbe38..f0b4c1624b88d29a249c011e38e8f063651f2744 100644 (file)
@@ -131,7 +131,7 @@ public:
 private:
        void set_capture_state(capture_state state);
 
-       void update_signals(std::shared_ptr<devices::Device> device);
+       void update_signals();
 
        std::shared_ptr<view::Signal> signal_from_channel(
                std::shared_ptr<sigrok::Channel> channel) const;