fix windows compile error/warning

This commit is contained in:
Harry Chen
2026-08-09 22:28:11 -04:00
parent bcc3571777
commit c033971528
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -5,6 +5,9 @@
#include <cstddef>
#if defined(_WIN32)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN // rpcndr.h's `#define small char` reaches far from here
#endif
#include <windows.h>
#else
#include <unistd.h>
+1 -1
View File
@@ -303,7 +303,7 @@ Reference referenceSolve(const BAProblem& P, double lambda, double lossParam,
std::vector<double> V(9 * (size_t)P.num_points, 0.0), bp(3 * (size_t)P.num_points, 0.0);
std::vector<double> Wp((size_t)P.num_points * n * 3, 0.0);
bacpu::withLoss(loss, [&](auto L) {
bacpu::withLoss(loss, [&]([[maybe_unused]] auto L) { // only decltype(L) is read
for (uint32_t o = 0; o < P.num_obs; o++) {
const uint32_t img = P.obs_image[o], pt = P.obs_point[o];
const BAProblem::Group& gr = P.groups[P.image_group[img]];