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-Url: http://git.code-monkey.de/?p=pulseview.git;a=commitdiff_plain;h=8fe262de9a59039431bd3b4d9a7b3ee4a4429d4d 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 7bcabee..d45b9fa 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 9713167..0a546f0 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