Internal cleanup (#1051)

Fix lint errors.
master
jie 2018-04-11 00:56:22 -07:00 committed by Wally B. Feed
parent 7b0963216f
commit d1161b5f8e
7 changed files with 31 additions and 19 deletions

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_H_
#define CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_H_
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_2D_H_
#define CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_2D_H_
#include <chrono>
#include <memory>
@ -119,4 +119,4 @@ class LocalTrajectoryBuilder2D {
} // namespace mapping
} // namespace cartographer
#endif // CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_H_
#endif // CARTOGRAPHER_MAPPING_INTERNAL_2D_LOCAL_TRAJECTORY_BUILDER_2D_H_

View File

@ -153,7 +153,8 @@ class PoseGraph2D : public PoseGraph {
SubmapState state = SubmapState::kActive;
};
MapById<SubmapId, PoseGraphInterface::SubmapData> GetSubmapDataUnderLock();
MapById<SubmapId, PoseGraphInterface::SubmapData> GetSubmapDataUnderLock()
REQUIRES(mutex_);
// Handles a new work item.
void AddWorkItem(const std::function<void()>& work_item) REQUIRES(mutex_);
@ -279,9 +280,11 @@ class PoseGraph2D : public PoseGraph {
int num_submaps(int trajectory_id) const override;
std::vector<SubmapId> GetSubmapIds(int trajectory_id) const override;
MapById<SubmapId, PoseGraphInterface::SubmapData> GetAllSubmapData()
const override;
MapById<NodeId, TrajectoryNode> GetTrajectoryNodes() const override;
std::vector<PoseGraphInterface::Constraint> GetConstraints() const override;
const override REQUIRES(parent_->mutex_);
MapById<NodeId, TrajectoryNode> GetTrajectoryNodes() const override
REQUIRES(parent_->mutex_);
std::vector<PoseGraphInterface::Constraint> GetConstraints() const override
REQUIRES(parent_->mutex_);
void MarkSubmapAsTrimmed(const SubmapId& submap_id)
REQUIRES(parent_->mutex_) override;
bool IsFinished(int trajectory_id) const override REQUIRES(parent_->mutex_);

View File

@ -14,6 +14,13 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_FAKE_TRIMMABLE_H_
#define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_FAKE_TRIMMABLE_H_
#include <vector>
#include "cartographer/mapping/pose_graph_trimmer.h"
namespace cartographer {
namespace mapping {
namespace testing {
@ -64,3 +71,5 @@ class FakeTrimmable : public Trimmable {
} // namespace testing
} // namespace mapping
} // namespace cartographer
#endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_FAKE_TRIMMABLE_H_

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H
#define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_
#define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_
#include "cartographer/mapping/map_builder_interface.h"
#include "cartographer/mapping/trajectory_builder_interface.h"
@ -60,4 +60,4 @@ class MockMapBuilder : public mapping::MapBuilderInterface {
} // namespace mapping
} // namespace cartographer
#endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H
#endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_MAP_BUILDER_H_

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
#define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
#ifndef CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_
#define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_
#include "cartographer/mapping/pose_graph_interface.h"
#include "glog/logging.h"
@ -55,4 +55,4 @@ class MockPoseGraph : public mapping::PoseGraphInterface {
} // namespace mapping
} // namespace cartographer
#endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
#endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H
#define CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H
#ifndef CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H_
#define CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H_
#include "cartographer/mapping/pose_graph.h"
#include "cartographer/sensor/data.h"
@ -39,4 +39,4 @@ class LocalSlamResultData : public sensor::Data {
} // namespace mapping
} // namespace cartographer
#endif // CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H
#endif // CARTOGRAPHER_MAPPING_LOCAL_SLAM_RESULT_DATA_H_

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef CARTOGRAPHER_SENSOR_INTERNAL_MAPPING_DISPATCHABLE_H_
#define CARTOGRAPHER_SENSOR_INTERNAL_MAPPING_DISPATCHABLE_H_
#ifndef CARTOGRAPHER_SENSOR_INTERNAL_DISPATCHABLE_H_
#define CARTOGRAPHER_SENSOR_INTERNAL_DISPATCHABLE_H_
#include "cartographer/mapping/trajectory_builder_interface.h"
#include "cartographer/sensor/data.h"
@ -49,4 +49,4 @@ std::unique_ptr<Dispatchable<DataType>> MakeDispatchable(
} // namespace sensor
} // namespace cartographer
#endif // CARTOGRAPHER_SENSOR_INTERNAL_MAPPING_DISPATCHABLE_H_
#endif // CARTOGRAPHER_SENSOR_INTERNAL_DISPATCHABLE_H_