Change number assign for bool

This commit is contained in:
2020-04-02 17:43:47 +02:00
parent 8593ed51b6
commit 8af70fb6d9
+2 -2
View File
@@ -94,7 +94,7 @@ char* RingBuffer::reserve(shared_ptr<FrameMetadata> frame_metadata)
lock_guard<mutex> lock(ringbuffer_slots_mutex_);
if (!ringbuffer_slots_[write_index_]) {
ringbuffer_slots_[write_index_] = 1;
ringbuffer_slots_[write_index_] = true;
frame_metadata->buffer_slot_index = write_index_;
@@ -235,7 +235,7 @@ void RingBuffer::release(size_t buffer_slot_index)
lock_guard<mutex> lock(ringbuffer_slots_mutex_);
if (ringbuffer_slots_[buffer_slot_index]) {
ringbuffer_slots_[buffer_slot_index] = 0;
ringbuffer_slots_[buffer_slot_index] = false;
buffer_used_slots_--;