]> sigrok.org Git - pulseview.git/commitdiff
Segment: Include <memory> so we don't get error at compile time
authorPaul Kasemir <redacted>
Tue, 30 Aug 2022 18:32:49 +0000 (12:32 -0600)
committerSoeren Apel <redacted>
Mon, 26 Sep 2022 22:28:31 +0000 (00:28 +0200)
Example build failure:
  In file included from /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.cpp:21:
  /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:130:14: error: 'shared_ptr' in namespace 'std' does not name a template type
    130 | typedef std::shared_ptr<pv::data::Segment> SharedPtrToSegment;
        |              ^~~~~~~~~~
  /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:32:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
     31 | #include <QObject>
    +++ |+#include <memory>
     32 |

pv/data/segment.hpp

index 66085fafc935d151f5ded69cc7863bff984858a4..f4601d0444c0a9bab0aa88dd9efe3e1996dde9e4 100644 (file)
@@ -24,6 +24,7 @@
 #include "pv/util.hpp"
 
 #include <atomic>
+#include <memory>
 #include <mutex>
 #include <thread>
 #include <deque>