From: Martin Ling Date: Tue, 25 Aug 2015 18:30:39 +0000 (+0100) Subject: Don't try to store a reference to a shared pointer. X-Git-Tag: pulseview-0.3.0~130 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8fe262de9a59039431bd3b4d9a7b3ee4a4429d4d;p=pulseview.git Don't try to store a reference to a shared pointer. Fixes #596. --- diff --git a/pv/devices/sessionfile.cpp b/pv/devices/sessionfile.cpp index 7bcabee0..d45b9fa4 100644 --- a/pv/devices/sessionfile.cpp +++ b/pv/devices/sessionfile.cpp @@ -27,7 +27,7 @@ namespace pv { namespace devices { -SessionFile::SessionFile(const std::shared_ptr &context, +SessionFile::SessionFile(const std::shared_ptr context, const std::string &file_name) : File(file_name), context_(context) { diff --git a/pv/devices/sessionfile.hpp b/pv/devices/sessionfile.hpp index 97131676..0a546f0c 100644 --- a/pv/devices/sessionfile.hpp +++ b/pv/devices/sessionfile.hpp @@ -35,13 +35,13 @@ namespace devices { class SessionFile final : public File { public: - SessionFile(const std::shared_ptr &context, + SessionFile(const std::shared_ptr context, const std::string &file_name); void create(); private: - const std::shared_ptr &context_; + const std::shared_ptr context_; }; } // namespace devices