projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make unit_size in Snapshot class unsigned.
[pulseview.git]
/
pv
/
data
/
snapshot.h
diff --git
a/pv/data/snapshot.h
b/pv/data/snapshot.h
index 499164400014d20001ae1e130c177bfcefe990be..fcb420c773e27a37359dcff4f2678b625764e73c 100644
(file)
--- a/
pv/data/snapshot.h
+++ b/
pv/data/snapshot.h
@@
-25,6
+25,7
@@
#include <thread>
#include <mutex>
#include <thread>
#include <mutex>
+#include <vector>
namespace pv {
namespace data {
namespace pv {
namespace data {
@@
-32,13
+33,13
@@
namespace data {
class Snapshot
{
public:
class Snapshot
{
public:
- Snapshot(int unit_size);
+ Snapshot(
unsigned
int unit_size);
virtual ~Snapshot();
uint64_t get_sample_count() const;
virtual ~Snapshot();
uint64_t get_sample_count() const;
- int unit_size() const;
+
unsigned
int unit_size() const;
/**
* @brief Increase the capacity of the snapshot.
/**
* @brief Increase the capacity of the snapshot.
@@
-72,10
+73,10
@@
protected:
protected:
mutable std::recursive_mutex _mutex;
protected:
mutable std::recursive_mutex _mutex;
-
void *
_data;
+
std::vector<uint8_t>
_data;
uint64_t _sample_count;
uint64_t _capacity;
uint64_t _sample_count;
uint64_t _capacity;
- int _unit_size;
+
unsigned
int _unit_size;
};
} // namespace data
};
} // namespace data