Add MutexLocker to ConnectedComponents::GetComponent and SparsePoseGr… (#565)
…aph::TrimmingHandle::MarkSubmapAsTrimmed To make them compile successfully in google.master
parent
752a279035
commit
ed71914805
|
@ -92,6 +92,7 @@ std::vector<std::vector<int>> ConnectedComponents::Components() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> ConnectedComponents::GetComponent(const int trajectory_id) {
|
std::vector<int> ConnectedComponents::GetComponent(const int trajectory_id) {
|
||||||
|
common::MutexLocker locker(&lock_);
|
||||||
const int set_id = FindSet(trajectory_id);
|
const int set_id = FindSet(trajectory_id);
|
||||||
std::vector<int> trajectory_ids;
|
std::vector<int> trajectory_ids;
|
||||||
for (const auto& entry : forest_) {
|
for (const auto& entry : forest_) {
|
||||||
|
|
|
@ -247,7 +247,8 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
~TrimmingHandle() override {}
|
~TrimmingHandle() override {}
|
||||||
|
|
||||||
int num_submaps(int trajectory_id) const override;
|
int num_submaps(int trajectory_id) const override;
|
||||||
void MarkSubmapAsTrimmed(const mapping::SubmapId& submap_id) override;
|
void MarkSubmapAsTrimmed(const mapping::SubmapId& submap_id)
|
||||||
|
REQUIRES(parent_->mutex_) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SparsePoseGraph* const parent_;
|
SparsePoseGraph* const parent_;
|
||||||
|
|
|
@ -251,7 +251,8 @@ class SparsePoseGraph : public mapping::SparsePoseGraph {
|
||||||
~TrimmingHandle() override {}
|
~TrimmingHandle() override {}
|
||||||
|
|
||||||
int num_submaps(int trajectory_id) const override;
|
int num_submaps(int trajectory_id) const override;
|
||||||
void MarkSubmapAsTrimmed(const mapping::SubmapId& submap_id) override;
|
void MarkSubmapAsTrimmed(const mapping::SubmapId& submap_id)
|
||||||
|
REQUIRES(parent_->mutex_) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SparsePoseGraph* const parent_;
|
SparsePoseGraph* const parent_;
|
||||||
|
|
Loading…
Reference in New Issue