]> sigrok.org Git - pulseview.git/commitdiff
Segment: Move definition of MaxChunkSize
authorSoeren Apel <redacted>
Sat, 18 Feb 2017 07:21:00 +0000 (08:21 +0100)
committerUwe Hermann <redacted>
Sat, 18 Feb 2017 21:59:58 +0000 (22:59 +0100)
This fixes a compile error with clang:

pv/data/segment.cpp.o: In function `unsigned long const& std::min<unsigned long>(unsigned long const&, unsigned long const&)':
/usr/bin/../lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_algobase.h:200: undefined reference to `pv::data::Segment::MaxChunkSize'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

pv/data/segment.cpp
pv/data/segment.hpp

index 483d97b13304b337801066ad84a0ae5dcdb57e62..cfe9aafa0385b7935e9e67fda9d026bedf4256f3 100644 (file)
@@ -33,6 +33,8 @@ using std::vector;
 namespace pv {
 namespace data {
 
+const uint64_t Segment::MaxChunkSize = 10*1024*1024;  /* 10MiB */
+
 Segment::Segment(uint64_t samplerate, unsigned int unit_size) :
        sample_count_(0),
        start_time_(0),
index ba1db8e42cee554bc5778dba843dfd63713e9db1..14122d6a001a8d1e7cd25c61091a3a38f35e3cb6 100644 (file)
@@ -51,7 +51,7 @@ typedef struct {
 class Segment
 {
 private:
-       static const uint64_t MaxChunkSize = 10*1024*1024;  /* 10MiB */
+       static const uint64_t MaxChunkSize;
 
 public:
        Segment(uint64_t samplerate, unsigned int unit_size);