From 5ad3b48b283738425949145182edc18edf6ea29e Mon Sep 17 00:00:00 2001 From: Martin Ling Date: Wed, 27 Aug 2014 19:31:05 +0100 Subject: [PATCH] Make unit_size in Snapshot class unsigned. --- pv/data/snapshot.cpp | 4 ++-- pv/data/snapshot.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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 -- 2.30.2