Skip to content

Commit

Permalink
Use pragma once instead of name macro
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ueber2y committed Dec 14, 2024
1 parent 2373f14 commit 61ce224
Show file tree
Hide file tree
Showing 65 changed files with 65 additions and 261 deletions.
5 changes: 1 addition & 4 deletions limap/base/camera.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_CAMERA_H_
#define LIMAP_BASE_CAMERA_H_
#pragma once

#include <cmath>
#include <fstream>
Expand Down Expand Up @@ -114,5 +113,3 @@ class CameraPose {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/camera_models.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_CAMERA_MODELS_H_
#define LIMAP_BASE_CAMERA_MODELS_H_
#pragma once

#include <colmap/sensor/models.h>

Expand Down Expand Up @@ -45,5 +44,3 @@ void ParamsToKvec(const colmap::CameraModelId model_id, const T *params,
}

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/camera_view.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_CAMERA_VIEW_H_
#define LIMAP_BASE_CAMERA_VIEW_H_
#pragma once

#include <cmath>
#include <fstream>
Expand Down Expand Up @@ -89,5 +88,3 @@ class CameraView : public CameraImage {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/graph.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_GRAPH_H_
#define LIMAP_BASE_GRAPH_H_
#pragma once

#include <algorithm>
#include <chrono>
Expand Down Expand Up @@ -97,5 +96,3 @@ CountTrackEdges(const Graph &graph, const std::vector<size_t> &track_labels,
const std::vector<bool> is_root);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/image_collection.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_IMAGE_COLLECTION_H_
#define LIMAP_BASE_IMAGE_COLLECTION_H_
#pragma once

#include <cmath>
#include <fstream>
Expand Down Expand Up @@ -115,5 +114,3 @@ class ImageCollection {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/infinite_line.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_INFINITE_LINE_H_
#define LIMAP_BASE_INFINITE_LINE_H_
#pragma once

#include "_limap/helpers.h"
#include <pybind11/numpy.h>
Expand Down Expand Up @@ -86,5 +85,3 @@ Line3d GetLineSegmentFromInfiniteLine3d(const InfiniteLine3d &inf_line,
const int num_outliers = 2);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/line_dists.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_LINE_DISTS_H_
#define LIMAP_BASE_LINE_DISTS_H_
#pragma once

#include <cmath>
#include <pybind11/eigen.h>
Expand Down Expand Up @@ -221,5 +220,3 @@ double infinite_dist_perpendicular_scaleinv_line3dpp(const Line3d &l1,
const Line3d &l2);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/line_linker.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_LINE_LINKER_H_
#define LIMAP_BASE_LINE_LINKER_H_
#pragma once

#include "_limap/helpers.h"
#include <pybind11/numpy.h>
Expand Down Expand Up @@ -228,5 +227,3 @@ class LineLinker {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/linebase.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_LINEBASE_H_
#define LIMAP_BASE_LINEBASE_H_
#pragma once

#include <cmath>
#include <pybind11/eigen.h>
Expand Down Expand Up @@ -69,5 +68,3 @@ Line3d unprojection_line2d(const Line2d &line2d, const CameraView &view,
const std::pair<double, double> &depths);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/linetrack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_LINETRACK_H_
#define LIMAP_BASE_LINETRACK_H_
#pragma once

#include <cmath>
#include <map>
Expand Down Expand Up @@ -82,5 +81,3 @@ void ComputeFConsistencySamples(
const std::pair<double, double> sample_range, const int n_samples);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/pointtrack.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_POINTTRACK_H_
#define LIMAP_BASE_POINTTRACK_H_
#pragma once

#include <cmath>
#include <map>
Expand Down Expand Up @@ -53,5 +52,3 @@ class PointTrack {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/pose.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_POSE_H_
#define LIMAP_BASE_POSE_H_
#pragma once

#include <colmap/geometry/pose.h>

Expand Down Expand Up @@ -30,5 +29,3 @@ Eigen::Matrix3d QuaternionToRotationMatrix(const Eigen::Vector4d &qvec);
Eigen::Vector4d NormalizeQuaternion(const Eigen::Vector4d &qvec);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/base/transforms.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_BASE_TRANSFORMS_H_
#define LIMAP_BASE_TRANSFORMS_H_
#pragma once

#include "base/camera.h"
#include "base/pose.h"
Expand Down Expand Up @@ -30,5 +29,3 @@ CameraPose pose_similarity_transform(const CameraPose &pose,
const SimilarityTransform3 &transform);

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/ceres_extensions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_CERES_EXTENSIONS_H
#define LIMAP_CERESBASE_CERES_EXTENSIONS_H
#pragma once

// Modified from the pixel-perfect-sfm project

Expand Down Expand Up @@ -49,5 +48,3 @@ inline void AssignSolverOptionsFromDict(ceres::Solver::Options &solver_options,
ASSIGN_PYDICT_ITEM_TO_MEMBER(solver_options, dict, inner_iteration_tolerance,
double)
}

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/interpolation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_INTERPOLATION_H
#define LIMAP_CERESBASE_INTERPOLATION_H
#pragma once

// Modified from the pixel-perfect-sfm project
// [LINK] https://github.com/cvg/pixel-perfect-sfm
Expand Down Expand Up @@ -745,5 +744,3 @@ template <typename Grid> class PixelInterpolator : public Interpolator<Grid> {
};

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/line_dists.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_LINE_DISTS_H
#define LIMAP_CERESBASE_LINE_DISTS_H
#pragma once

#include <ceres/ceres.h>
#include <ceres/rotation.h>
Expand Down Expand Up @@ -88,5 +87,3 @@ T CeresComputeDist3D_angle(const T dir1[3], const T dir2[3]) {
}

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/line_projection.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_LINE_PROJECTION_H
#define LIMAP_CERESBASE_LINE_PROJECTION_H
#pragma once

#include "ceresbase/line_transforms.h"
#include "ceresbase/point_projection.h"
Expand Down Expand Up @@ -214,5 +213,3 @@ bool Ceres_GetIntersection2dFromInfiniteLine3d(
}

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/line_transforms.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_LINE_TRANSFORMS_H
#define LIMAP_CERESBASE_LINE_TRANSFORMS_H
#pragma once

#include <ceres/ceres.h>
#include <ceres/rotation.h>
Expand Down Expand Up @@ -73,5 +72,3 @@ bool Ceres_IntersectLineCoordinates(const T coor1[3], const T coor2[3],
}

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/ceresbase/loss_functions.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_CERESBASE_LOSS_FUNCTIONS_H
#define LIMAP_CERESBASE_LOSS_FUNCTIONS_H
#pragma once

// Modified from the pixel-perfect-sfm project.

Expand Down Expand Up @@ -249,5 +248,3 @@ inline ceres::LossFunction *CreateLossFunction(py::dict dict) {
}

} // namespace limap

#endif
7 changes: 1 addition & 6 deletions limap/ceresbase/parameterization.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#ifndef LIMAP_CERESBASE_PARAMETERIZATION_H
#define LIMAP_CERESBASE_PARAMETERIZATION_H

// Inspired by COLMAP: https://colmap.github.io/
#pragma once

#include <ceres/ceres.h>
#include <ceres/rotation.h>
Expand Down Expand Up @@ -38,5 +35,3 @@ inline void SetSphereManifold(ceres::Problem *problem, double *params) {
}

} // namespace limap

#endif
7 changes: 1 addition & 6 deletions limap/ceresbase/point_projection.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#ifndef LIMAP_CERESBASE_POINT_PROJECTION_H
#define LIMAP_CERESBASE_POINT_PROJECTION_H

// Modified from the pixel-perfect-sfm project
#pragma once

#include <ceres/ceres.h>
#include <ceres/rotation.h>
Expand Down Expand Up @@ -64,5 +61,3 @@ template <typename T> inline bool IsInsideZeroL(const T &value, double L) {
}

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/estimators/absolute_pose/hybrid_pose_estimator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_ESTIMATORS_POSE_HYBRID_POSE_ESTIMATOR_H_
#define LIMAP_ESTIMATORS_POSE_HYBRID_POSE_ESTIMATOR_H_
#pragma once

#include "_limap/helpers.h"
#include "base/camera.h"
Expand Down Expand Up @@ -139,5 +138,3 @@ EstimateAbsolutePose_PointLine_Hybrid(
} // namespace estimators

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/estimators/absolute_pose/joint_pose_estimator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_ESTIMATORS_POSE_JOINT_POSE_ESTIMATOR_H_
#define LIMAP_ESTIMATORS_POSE_JOINT_POSE_ESTIMATOR_H_
#pragma once

#include "_limap/helpers.h"
#include "base/camera.h"
Expand Down Expand Up @@ -105,5 +104,3 @@ EstimateAbsolutePose_PointLine(const std::vector<Line3d> &l3ds,
} // namespace estimators

} // namespace limap

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
//
// author: Torsten Sattler, [email protected]

#ifndef LIMAP_ESTIMATORS_POSE_PL_ABSOLUTE_POSE_HYBRID_RANSAC_H_
#define LIMAP_ESTIMATORS_POSE_PL_ABSOLUTE_POSE_HYBRID_RANSAC_H_
#pragma once

#include <algorithm>
#include <cmath>
Expand Down Expand Up @@ -622,5 +621,3 @@ class PointLineAbsolutePoseHybridRansac : public HybridRansacBase {
} // namespace estimators

} // namespace limap

#endif
6 changes: 1 addition & 5 deletions limap/estimators/absolute_pose/pl_absolute_pose_ransac.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Copyright (c) 2019, Torsten Sattler
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -28,8 +27,7 @@
//
// author: Torsten Sattler, [email protected]

#ifndef LIMAP_ESTIMATORS_POSE_PL_ABSOLUTE_POSE_RANSAC_H_
#define LIMAP_ESTIMATORS_POSE_PL_ABSOLUTE_POSE_RANSAC_H_
#pragma once

#include <algorithm>
#include <cmath>
Expand Down Expand Up @@ -457,5 +455,3 @@ class PointLineAbsolutePoseRansac : public RansacBase {
} // namespace estimators

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/estimators/extended_hybrid_ransac.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_ESTIMATORS_EXTENDED_HYBRID_RANSAC_H_
#define LIMAP_ESTIMATORS_EXTENDED_HYBRID_RANSAC_H_
#pragma once

#include <RansacLib/hybrid_ransac.h>

Expand All @@ -18,5 +17,3 @@ class ExtendedHybridLORansacOptions : public ransac_lib::HybridLORansacOptions {
} // namespace estimators

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/evaluation/base_evaluator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_EVALUATION_BASE_EVALUATOR_H_
#define LIMAP_EVALUATION_BASE_EVALUATOR_H_
#pragma once

#include "base/linebase.h"
#include "util/types.h"
Expand Down Expand Up @@ -37,5 +36,3 @@ class BaseEvaluator {
} // namespace evaluation

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/evaluation/mesh_evaluator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_EVALUATION_MESH_EVALUATOR_H_
#define LIMAP_EVALUATION_MESH_EVALUATOR_H_
#pragma once

#include "base/linebase.h"
#include "evaluation/base_evaluator.h"
Expand Down Expand Up @@ -30,5 +29,3 @@ class MeshEvaluator : public BaseEvaluator {
} // namespace evaluation

} // namespace limap

#endif
5 changes: 1 addition & 4 deletions limap/evaluation/point_cloud_evaluator.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef LIMAP_EVALUATION_POINT_CLOUD_EVALUATOR_H_
#define LIMAP_EVALUATION_POINT_CLOUD_EVALUATOR_H_
#pragma once

#include "base/linebase.h"
#include "evaluation/base_evaluator.h"
Expand Down Expand Up @@ -47,5 +46,3 @@ class PointCloudEvaluator : public BaseEvaluator {
} // namespace evaluation

} // namespace limap

#endif
Loading

0 comments on commit 61ce224

Please sign in to comment.