projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make member variable underscores a suffix instead of a prefix
[pulseview.git]
/
pv
/
data
/
snapshot.h
diff --git
a/pv/data/snapshot.h
b/pv/data/snapshot.h
index 499164400014d20001ae1e130c177bfcefe990be..29d0eed44bc98b14c6b2c0528d9c9faadea84029 100644
(file)
--- a/
pv/data/snapshot.h
+++ b/
pv/data/snapshot.h
@@
-21,10
+21,9
@@
#ifndef PULSEVIEW_PV_DATA_SNAPSHOT_H
#define PULSEVIEW_PV_DATA_SNAPSHOT_H
#ifndef PULSEVIEW_PV_DATA_SNAPSHOT_H
#define PULSEVIEW_PV_DATA_SNAPSHOT_H
-#include <libsigrok/libsigrok.h>
-
#include <thread>
#include <mutex>
#include <thread>
#include <mutex>
+#include <vector>
namespace pv {
namespace data {
namespace pv {
namespace data {
@@
-32,13
+31,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.
@@
-71,11
+70,11
@@
protected:
void append_data(void *data, uint64_t samples);
protected:
void append_data(void *data, uint64_t samples);
protected:
- mutable std::recursive_mutex
_mutex
;
-
void *_data
;
- uint64_t
_sample_count
;
- uint64_t
_capacity
;
-
int _unit_size
;
+ mutable std::recursive_mutex
mutex_
;
+
std::vector<uint8_t> data_
;
+ uint64_t
sample_count_
;
+ uint64_t
capacity_
;
+
unsigned int unit_size_
;
};
} // namespace data
};
} // namespace data