From: Soeren Apel Date: Sat, 18 Feb 2017 07:21:00 +0000 (+0100) Subject: Segment: Move definition of MaxChunkSize X-Git-Tag: pulseview-0.4.0~185 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=dd3f9a41a6b4debf5ad7aa8226bebd13504f2295;p=pulseview.git Segment: Move definition of MaxChunkSize This fixes a compile error with clang: pv/data/segment.cpp.o: In function `unsigned long const& std::min(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) --- diff --git a/pv/data/segment.cpp b/pv/data/segment.cpp index 483d97b1..cfe9aafa 100644 --- a/pv/data/segment.cpp +++ b/pv/data/segment.cpp @@ -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), diff --git a/pv/data/segment.hpp b/pv/data/segment.hpp index ba1db8e4..14122d6a 100644 --- a/pv/data/segment.hpp +++ b/pv/data/segment.hpp @@ -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);