Skip to content

Commit de4bf1d

Browse files
committed
remove useless code
1 parent 771a710 commit de4bf1d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+553
-2775
lines changed

3rdparty/apriltag/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ if(BUILD_PYTHON_WRAPPER)
133133
endif(BUILD_PYTHON_WRAPPER)
134134

135135
if (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BUILD_PYTHON_WRAPPER)
136-
# TODO deal with both python2/3
137136
execute_process(COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/python_build_flags.py OUTPUT_VARIABLE PY_OUT)
138137
set(PY_VARS CFLAGS LDFLAGS LINKER EXT_SUFFIX)
139138
cmake_parse_arguments(PY "" "${PY_VARS}" "" ${PY_OUT})

3rdparty/apriltag/apriltag.c

-1
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,6 @@ static void refine_edges(apriltag_detector_t *td, image_u8_t *im_orig,
902902
double Cxy = Mxy / N - Ex * Ey;
903903
double Cyy = Myy / N - Ey * Ey;
904904

905-
// TODO: Can replace this with same code as in fit_line.
906905
double normal_theta = .5 * atan2f(-2 * Cxy, (Cyy - Cxx));
907906
nx = cosf(normal_theta);
908907
ny = sinf(normal_theta);

3rdparty/apriltag/common/getopt.c

-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ int getopt_parse(getopt_t *gopt, int argc, char *argv[], int showErrors) {
218218
}
219219

220220
if (goo->type == GOO_STRING_TYPE) {
221-
// TODO: check whether next argument is an option, denoting
222221
// missing argument
223222
if ((i + 1) < zarray_size(toks)) {
224223
char *val = NULL;
@@ -272,7 +271,6 @@ int getopt_parse(getopt_t *gopt, int argc, char *argv[], int showErrors) {
272271
if ((i + 1) < zarray_size(toks)) {
273272
char *val = NULL;
274273
zarray_get(toks, i + 1, &val);
275-
// TODO: allow negative numerical values for short-name
276274
// options ?
277275
if (val[0] == '-') {
278276
okay = 0;

3rdparty/apriltag/common/homography.c

-2
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,6 @@ matd_t *homography_to_model_view(const matd_t *H, double F, double G, double A,
396396
double R12 = R20 * R01 - R00 * R21;
397397
double R22 = R00 * R11 - R10 * R01;
398398

399-
// TODO XXX: Improve rotation matrix by applying polar decomposition.
400-
401399
return matd_create_data(4, 4,
402400
(double[]){R00, R01, R02, TX, R10, R11, R12, TY,
403401
R20, R21, R22, TZ, 0, 0, 0, 1});

3rdparty/apriltag/common/matd.c

-9
Original file line numberDiff line numberDiff line change
@@ -516,14 +516,6 @@ matd_t *matd_inverse(const matd_t *x) {
516516
return NULL; // unreachable
517517
}
518518

519-
// TODO Optimization: Some operations we could perform in-place,
520-
// saving some memory allocation work. E.g., ADD, SUBTRACT. Just need
521-
// to make sure that we don't do an in-place modification on a matrix
522-
// that was an input argument!
523-
524-
// handle right-associative operators, greedily consuming them. These
525-
// include transpose and inverse. This is called by the main recursion
526-
// method.
527519
static inline matd_t *matd_op_gobble_right(const char *expr, int *pos,
528520
matd_t *acc, matd_t **garb,
529521
int *garbpos) {
@@ -1091,7 +1083,6 @@ static matd_svd_t matd_svd_tall(matd_t *A, int flags) {
10911083
for (int i = 0; i < vlen; i++)
10921084
v[i] /= mag;
10931085

1094-
// TODO: optimize these multiplications
10951086
// matd_t *Q = matd_identity(A->ncols);
10961087
// for (int i = 0; i < vlen; i++)
10971088
// for (int j = 0; j < vlen; j++)

3rdparty/apriltag/common/pjpeg.c

-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ static inline uint32_t bd_get_offset(struct bit_decoder *bd) {
238238
}
239239

240240
static int pjpeg_decode_buffer(struct pjpeg_decode_state *pjd) {
241-
// XXX TODO Include sanity check that this is actually a JPG
242241

243242
struct bit_decoder bd;
244243
memset(&bd, 0, sizeof(struct bit_decoder));

3rdparty/apriltag/common/time_util.c

-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ int32_t timeutil_usleep(int64_t useconds) {
6767
Sleep(useconds / 1000);
6868
return 0;
6969
#else
70-
// unistd.h function, but usleep is obsoleted in POSIX.1-2008.
71-
// TODO: Eventually, rewrite this to use nanosleep
7270
return usleep(useconds);
7371
#endif
7472
}

3rdparty/json/json.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9888,7 +9888,7 @@ class binary_reader {
98889888
*/
98899889
bool get_ubjson_string(string_t &result, const bool get_char = true) {
98909890
if (get_char) {
9891-
get(); // TODO(niels): may we ignore N here?
9891+
get();
98929892
}
98939893

98949894
if (JSON_HEDLEY_UNLIKELY(

CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,12 @@ add_library(xrsfm
112112

113113
src/geometry/pnp.cc
114114
src/geometry/essential.cc
115-
src/geometry/triangluate_svd.cc
115+
src/geometry/triangulate_light.cc
116116
src/geometry/track_processor.cc
117117

118-
src/geometry/colmap/base/triangulation.cc
119118
src/geometry/colmap/estimators/absolute_pose.cc
120-
src/geometry/colmap/estimators/triangulation.cc
121119
src/geometry/colmap/estimators/polynomial.cc
122120
src/geometry/colmap/estimators/fundamental_matrix.cc
123-
src/geometry/colmap/estimators/utils.cc
124121
src/geometry/colmap/util/random.cc
125122
src/geometry/colmap/optim/random_sampler.cc
126123
src/geometry/colmap/optim/combination_sampler.cc

0 commit comments

Comments
 (0)