projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Android: Bundle Qt libs with the APK
[pulseview.git]
/
pv
/
data
/
logicsnapshot.cpp
diff --git
a/pv/data/logicsnapshot.cpp
b/pv/data/logicsnapshot.cpp
index 797a00bc54789f2cd4de2f7067448cf98aec0b96..825d2f1f51f6ea59d93883ec3178e68a11675e54 100644
(file)
--- a/
pv/data/logicsnapshot.cpp
+++ b/
pv/data/logicsnapshot.cpp
@@
-25,13
+25,11
@@
#include <stdlib.h>
#include <math.h>
#include <stdlib.h>
#include <math.h>
-#include <boost/foreach.hpp>
-
#include "config.h"
#include "logicsnapshot.h"
#include "config.h"
#include "logicsnapshot.h"
-using
boost
::lock_guard;
-using
boost
::recursive_mutex;
+using
std
::lock_guard;
+using
std
::recursive_mutex;
using std::max;
using std::min;
using std::pair;
using std::max;
using std::min;
using std::pair;
@@
-59,7
+57,7
@@
LogicSnapshot::LogicSnapshot(const sr_datafeed_logic &logic,
LogicSnapshot::~LogicSnapshot()
{
lock_guard<recursive_mutex> lock(_mutex);
LogicSnapshot::~LogicSnapshot()
{
lock_guard<recursive_mutex> lock(_mutex);
-
BOOST_FOREACH(MipMapLevel &l,
_mip_map)
+
for (MipMapLevel &l :
_mip_map)
free(l.data);
}
free(l.data);
}
@@
-164,7
+162,7
@@
void LogicSnapshot::get_samples(uint8_t *const data,
lock_guard<recursive_mutex> lock(_mutex);
const size_t size = (end_sample - start_sample) * _unit_size;
lock_guard<recursive_mutex> lock(_mutex);
const size_t size = (end_sample - start_sample) * _unit_size;
- memcpy(data, (const uint8_t*)_data + start_sample * _unit_size, size);
+ memcpy(data, (const uint8_t*)_data
.data()
+ start_sample * _unit_size, size);
}
void LogicSnapshot::reallocate_mipmap_level(MipMapLevel &m)
}
void LogicSnapshot::reallocate_mipmap_level(MipMapLevel &m)
@@
-203,9
+201,9
@@
void LogicSnapshot::append_payload_to_mipmap()
dest_ptr = (uint8_t*)m0.data + prev_length * _unit_size;
// Iterate through the samples to populate the first level mipmap
dest_ptr = (uint8_t*)m0.data + prev_length * _unit_size;
// Iterate through the samples to populate the first level mipmap
- const uint8_t *const end_src_ptr = (uint8_t*)_data +
+ const uint8_t *const end_src_ptr = (uint8_t*)_data
.data()
+
m0.length * _unit_size * MipMapScaleFactor;
m0.length * _unit_size * MipMapScaleFactor;
- for (src_ptr = (uint8_t*)_data +
+ for (src_ptr = (uint8_t*)_data
.data()
+
prev_length * _unit_size * MipMapScaleFactor;
src_ptr < end_src_ptr;)
{
prev_length * _unit_size * MipMapScaleFactor;
src_ptr < end_src_ptr;)
{
@@
-265,10
+263,9
@@
void LogicSnapshot::append_payload_to_mipmap()
uint64_t LogicSnapshot::get_sample(uint64_t index) const
{
uint64_t LogicSnapshot::get_sample(uint64_t index) const
{
- assert(_data);
assert(index < _sample_count);
assert(index < _sample_count);
- return unpack_sample((uint8_t*)_data + index * _unit_size);
+ return unpack_sample((uint8_t*)_data
.data()
+ index * _unit_size);
}
void LogicSnapshot::get_subsampled_edges(
}
void LogicSnapshot::get_subsampled_edges(