Clean up the public headers in `common`. (#1775)

In common, BlockingQueue and RateTimer are not used
in any public API and are made internal.

`common/utils.h` is unused code and removed.

Signed-off-by: Wolfgang Hess <whess@lyft.com>
master
Wolfgang Hess 2020-11-04 16:35:02 +01:00 committed by GitHub
parent 6715afe70c
commit 38dcf65d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 41 deletions

View File

@ -25,7 +25,7 @@
#include "cartographer/cloud/internal/handlers/add_trajectory_handler.h"
#include "cartographer/cloud/internal/handlers/finish_trajectory_handler.h"
#include "cartographer/cloud/internal/sensor/serialization.h"
#include "cartographer/common/blocking_queue.h"
#include "cartographer/common/internal/blocking_queue.h"
#include "glog/logging.h"
#include "grpc++/grpc++.h"

View File

@ -19,7 +19,7 @@
#include "async_grpc/execution_context.h"
#include "cartographer/cloud/internal/local_trajectory_uploader.h"
#include "cartographer/common/blocking_queue.h"
#include "cartographer/common/internal/blocking_queue.h"
#include "cartographer/mapping/map_builder_interface.h"
#include "cartographer/mapping/pose_graph_interface.h"
#include "cartographer/mapping/proto/serialization.pb.h"

View File

@ -23,7 +23,7 @@
#include "cartographer/cloud/internal/map_builder_context_interface.h"
#include "cartographer/cloud/map_builder_server_interface.h"
#include "cartographer/cloud/proto/map_builder_server_options.pb.h"
#include "cartographer/common/blocking_queue.h"
#include "cartographer/common/internal/blocking_queue.h"
#include "cartographer/common/time.h"
#include "cartographer/mapping/2d/submap_2d.h"
#include "cartographer/mapping/3d/submap_3d.h"

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "cartographer/common/blocking_queue.h"
#include "cartographer/common/internal/blocking_queue.h"
#include <memory>
#include <thread>

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#include "cartographer/common/rate_timer.h"
#include "cartographer/common/internal/rate_timer.h"
#include "gtest/gtest.h"

View File

@ -1,34 +0,0 @@
/*
* Copyright 2018 The Cartographer Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef CARTOGRAPHER_COMMON_UTILS_H_
#define CARTOGRAPHER_COMMON_UTILS_H_
namespace cartographer {
namespace common {
template <typename MapType, typename KeyType = typename MapType::key_type,
typename ValueType = typename MapType::mapped_type>
ValueType* FindOrNull(MapType& map, const KeyType& key) {
auto it = map.find(key);
if (it == map.end()) return nullptr;
return &(it->second);
}
} // namespace common
} // namespace cartographer
#endif // CARTOGRAPHER_COMMON_UTILS_H_

View File

@ -23,8 +23,8 @@
#include <set>
#include <string>
#include "cartographer/common/internal/rate_timer.h"
#include "cartographer/common/port.h"
#include "cartographer/common/rate_timer.h"
#include "cartographer/mapping/local_slam_result_data.h"
#include "cartographer/mapping/submaps.h"
#include "cartographer/mapping/trajectory_builder_interface.h"

View File

@ -23,7 +23,7 @@
#include <string>
#include <tuple>
#include "cartographer/common/blocking_queue.h"
#include "cartographer/common/internal/blocking_queue.h"
#include "cartographer/common/port.h"
#include "cartographer/common/time.h"
#include "cartographer/sensor/internal/dispatchable.h"