RAII
This commit is contained in:
parent
bf643970f0
commit
fdd12f6d75
@ -257,9 +257,8 @@ void ImageManipulator::threaded_get_color(int const t_h)
|
||||
reference_.at<uchar>(t_h, w + 2)};
|
||||
auto pos = std::find(std::begin(colors_), std::end(colors_), temp);
|
||||
if (pos == std::end(colors_)) {
|
||||
colors_mutex_.lock();
|
||||
std::lock_guard<std::mutex> lock(colors_mutex_);
|
||||
colors_.push_back(std::move(temp));
|
||||
colors_mutex_.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user