Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several compile-time warnings #1210

Merged
merged 4 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ if(WIN32)
endif()
endif()

# Avoids deprecation warning caused by internals of json_parser. This is properly fixed in
# Boost 1.76.0: https://github.com/boostorg/property_tree/commit/d1c8825a45a0717e1ad79583d3283b0e5e32831e
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS=1)

# Folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "_CMakePredefinedTargets")
Expand Down
2 changes: 1 addition & 1 deletion src/aliceVision/camera/distortion_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#define BOOST_TEST_MODULE distortion
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
#include <boost/test/tools/floating_point_comparison.hpp>
#include <aliceVision/unitTest.hpp>

using namespace aliceVision;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bool ImageDescriber_APRILTAG::describe(const image::Image<unsigned char>& image,
((tl[0]*br[1] - tl[1]*br[0]) * (bl[1]-tr[1]) - (tl[1]-br[1]) * (bl[0]*tr[1] - bl[1]*tr[0])) / denominator
);
Vec2 points[5] = { center, tl, bl, br, tr };
std::size_t indices[5] = { det->id, 30 + det->id, 60 + det->id, 90 + det->id, 120 + det->id};
int indices[5] = { det->id, 30 + det->id, 60 + det->id, 90 + det->id, 120 + det->id};
// compute scale from max side length and diagonals (divided by sqare root of 2):
const double scale = 0.5 * std::max({(tl-bl).norm(), (bl-br).norm(), (br-tr).norm(), (tr-tl).norm(), 0.707*(tl-br).norm(), 0.707*(tr-bl).norm()});
ALICEVISION_LOG_DEBUG(" New AprilTag: Id " << det->id << " ; Center location ( " << center[0] << " , " << center[1] << " ) ; Scale " << scale);
Expand Down
2 changes: 1 addition & 1 deletion src/dependencies/flann/src/cpp/flann/mpi/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#include <cstdlib>
#include <iostream>
#include <boost/bind.hpp>
#include <boost/bind/bind.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp>
Expand Down