From: Joel Holdsworth Date: Sat, 16 Mar 2013 15:54:47 +0000 (+0000) Subject: Make Snapshot::get_sample_count() a const function X-Git-Tag: pulseview-0.1.0~72 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e7c6e89875ce1a25ff4e69abcd792c4c93e4ddde;p=pulseview.git Make Snapshot::get_sample_count() a const function --- diff --git a/pv/data/snapshot.cpp b/pv/data/snapshot.cpp index f3855e06..afd1e43e 100644 --- a/pv/data/snapshot.cpp +++ b/pv/data/snapshot.cpp @@ -44,7 +44,7 @@ Snapshot::~Snapshot() free(_data); } -uint64_t Snapshot::get_sample_count() +uint64_t Snapshot::get_sample_count() const { lock_guard lock(_mutex); return _sample_count; diff --git a/pv/data/snapshot.h b/pv/data/snapshot.h index e99a7a3c..5fb79198 100644 --- a/pv/data/snapshot.h +++ b/pv/data/snapshot.h @@ -35,7 +35,7 @@ public: virtual ~Snapshot(); - uint64_t get_sample_count(); + uint64_t get_sample_count() const; protected: void append_data(void *data, uint64_t samples);