提交 192482aa 编写于 作者: J jiangyifei 提交者: Calvin Miao

some style changes

上级 e632d3ab
......@@ -74,11 +74,11 @@ int DiscretizedPath::query_closest_point(const double param) const {
}
}
std::vector<common::PathPoint>* DiscretizedPath::mutable_path_points() {
std::vector<common::PathPoint> *DiscretizedPath::mutable_path_points() {
return &path_points_;
}
const std::vector<common::PathPoint>& DiscretizedPath::path_points() const {
const std::vector<common::PathPoint> &DiscretizedPath::path_points() const {
return path_points_;
}
......@@ -86,7 +86,7 @@ std::size_t DiscretizedPath::num_of_points() const {
return path_points_.size();
}
const common::PathPoint& DiscretizedPath::path_point_at(
const common::PathPoint &DiscretizedPath::path_point_at(
const std::size_t index) const {
CHECK_LT(index, path_points_.size());
return path_points_[index];
......@@ -102,14 +102,14 @@ common::PathPoint DiscretizedPath::end_point() const {
return path_points_.back();
}
common::PathPoint& DiscretizedPath::path_point_at(const std::size_t index) {
common::PathPoint &DiscretizedPath::path_point_at(const std::size_t index) {
CHECK_LT(index, path_points_.size());
return path_points_[index];
}
std::vector<common::PathPoint>::const_iterator
DiscretizedPath::query_lower_bound(const double param) const {
auto func = [](const common::PathPoint& tp, const double param) {
auto func = [](const common::PathPoint &tp, const double param) {
return tp.s() < param;
};
return std::lower_bound(path_points_.begin(), path_points_.end(), param,
......
......@@ -47,15 +47,15 @@ class DiscretizedPath : public Path {
int query_closest_point(const double param) const;
std::vector<common::PathPoint>* mutable_path_points();
std::vector<common::PathPoint> *mutable_path_points();
const std::vector<common::PathPoint>& path_points() const;
const std::vector<common::PathPoint> &path_points() const;
std::size_t num_of_points() const;
const common::PathPoint& path_point_at(const std::size_t index) const;
const common::PathPoint &path_point_at(const std::size_t index) const;
common::PathPoint& path_point_at(const std::size_t index);
common::PathPoint &path_point_at(const std::size_t index);
private:
std::vector<common::PathPoint>::const_iterator query_lower_bound(
......
......@@ -33,27 +33,27 @@ FrenetFramePath::FrenetFramePath(
}
void FrenetFramePath::set_frenet_points(
const std::vector<common::FrenetFramePoint>& points) {
const std::vector<common::FrenetFramePoint> &points) {
points_ = points;
}
std::vector<common::FrenetFramePoint>* FrenetFramePath::mutable_points() {
std::vector<common::FrenetFramePoint> *FrenetFramePath::mutable_points() {
return &points_;
}
const std::vector<common::FrenetFramePoint>& FrenetFramePath::points() const {
const std::vector<common::FrenetFramePoint> &FrenetFramePath::points() const {
return points_;
}
std::size_t FrenetFramePath::num_points() const { return points_.size(); }
const common::FrenetFramePoint& FrenetFramePath::point_at(
const common::FrenetFramePoint &FrenetFramePath::point_at(
const std::size_t index) const {
CHECK_LT(index, points_.size());
return points_[index];
}
common::FrenetFramePoint& FrenetFramePath::point_at(const std::size_t index) {
common::FrenetFramePoint &FrenetFramePath::point_at(const std::size_t index) {
CHECK_LT(index, points_.size());
return points_[index];
}
......
......@@ -36,17 +36,17 @@ class FrenetFramePath {
virtual ~FrenetFramePath() = default;
void set_frenet_points(const std::vector<common::FrenetFramePoint>& points);
void set_frenet_points(const std::vector<common::FrenetFramePoint> &points);
std::vector<common::FrenetFramePoint>* mutable_points();
std::vector<common::FrenetFramePoint> *mutable_points();
const std::vector<common::FrenetFramePoint>& points() const;
const std::vector<common::FrenetFramePoint> &points() const;
std::size_t num_points() const;
const common::FrenetFramePoint& point_at(const std::size_t index) const;
const common::FrenetFramePoint &point_at(const std::size_t index) const;
common::FrenetFramePoint& point_at(const std::size_t index);
common::FrenetFramePoint &point_at(const std::size_t index);
private:
std::vector<common::FrenetFramePoint> points_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册