projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Remove unused arguments from 'format_time()'
[pulseview.git]
/
pv
/
data
/
segment.cpp
diff --git
a/pv/data/segment.cpp
b/pv/data/segment.cpp
index 111b62b71aadf0c43189540050c55e92de29dc43..bc08fd07917564d86e13f35f3d37ad20dcae64e9 100644
(file)
--- a/
pv/data/segment.cpp
+++ b/
pv/data/segment.cpp
@@
-78,8
+78,9
@@
void Segment::set_capacity(const uint64_t new_capacity)
assert(capacity_ >= sample_count_);
if (new_capacity > capacity_) {
- capacity_ = new_capacity;
+ // If we're out of memory, this will throw std::bad_alloc
data_.resize((new_capacity * unit_size_) + sizeof(uint64_t));
+ capacity_ = new_capacity;
}
}