From: Martin Ling Date: Wed, 27 Aug 2014 18:31:05 +0000 (+0100) Subject: Make unit_size in Snapshot class unsigned. X-Git-Tag: pulseview-0.3.0~553 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=5ad3b48b283738425949145182edc18edf6ea29e Make unit_size in Snapshot class unsigned. --- diff --git a/pv/data/snapshot.cpp b/pv/data/snapshot.cpp index e8e285e7..c02475b7 100644 --- a/pv/data/snapshot.cpp +++ b/pv/data/snapshot.cpp @@ -30,7 +30,7 @@ using std::recursive_mutex; namespace pv { namespace data { -Snapshot::Snapshot(int unit_size) : +Snapshot::Snapshot(unsigned int unit_size) : _sample_count(0), _capacity(0), _unit_size(unit_size) @@ -50,7 +50,7 @@ uint64_t Snapshot::get_sample_count() const return _sample_count; } -int Snapshot::unit_size() const +unsigned int Snapshot::unit_size() const { return _unit_size; } diff --git a/pv/data/snapshot.h b/pv/data/snapshot.h index e4b9c0e8..fcb420c7 100644 --- a/pv/data/snapshot.h +++ b/pv/data/snapshot.h @@ -33,13 +33,13 @@ namespace data { class Snapshot { public: - Snapshot(int unit_size); + Snapshot(unsigned int unit_size); virtual ~Snapshot(); uint64_t get_sample_count() const; - int unit_size() const; + unsigned int unit_size() const; /** * @brief Increase the capacity of the snapshot. @@ -76,7 +76,7 @@ protected: std::vector _data; uint64_t _sample_count; uint64_t _capacity; - int _unit_size; + unsigned int _unit_size; }; } // namespace data