mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 15:14:02 +00:00
Fix various warnings, e.g. remove unused variables, etc.
This commit is contained in:
parent
6f31aeee3a
commit
ebbc58b52e
@ -2,9 +2,8 @@
|
||||
|
||||
// Copyright (c) 2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2015, 2017, 2018.
|
||||
// Modifications copyright (c) 2015-2018, Oracle and/or its affiliates.
|
||||
|
||||
// This file was modified by Oracle on 2015-2021.
|
||||
// Modifications copyright (c) 2015-2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@ -132,9 +131,11 @@ static inline bool preceding(int dir,
|
||||
RobustPolicy const& robust_policy)
|
||||
{
|
||||
typename geometry::robust_point_type<Point, RobustPolicy>::type robust_point;
|
||||
assert_coordinate_type_equal(robust_point, point_box);
|
||||
geometry::recalculate(robust_point, point, robust_policy);
|
||||
|
||||
// After recalculate() to prevent warning: 'robust_point' may be used uninitialized
|
||||
assert_coordinate_type_equal(robust_point, point_box);
|
||||
|
||||
return preceding_check<Dimension, Box>::apply(dir, robust_point,
|
||||
point_box,
|
||||
other_box);
|
||||
|
@ -161,10 +161,10 @@ struct call_intersection_insert
|
||||
typename Strategy
|
||||
>
|
||||
static inline OutputIterator apply(Geometry1 const& geometry1,
|
||||
Geometry2 const& geometry2,
|
||||
RobustPolicy const& robust_policy,
|
||||
Geometry2 const& ,
|
||||
RobustPolicy const& ,
|
||||
OutputIterator out,
|
||||
Strategy const& strategy)
|
||||
Strategy const& )
|
||||
{
|
||||
base_t::access::get(out) = geometry::detail::convert_to_output
|
||||
<
|
||||
|
@ -86,6 +86,10 @@ public:
|
||||
, m_it2(other.m_it2)
|
||||
{}
|
||||
|
||||
concatenate_iterator(concatenate_iterator const& other) = default;
|
||||
|
||||
concatenate_iterator& operator=(concatenate_iterator const& other) = default;
|
||||
|
||||
private:
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
|
@ -100,6 +100,8 @@ public:
|
||||
m_inner_it(other.m_inner_it)
|
||||
{}
|
||||
|
||||
flatten_iterator(flatten_iterator const& other) = default;
|
||||
|
||||
flatten_iterator& operator=(flatten_iterator const& other)
|
||||
{
|
||||
m_outer_it = other.m_outer_it;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2008-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017-2020.
|
||||
// Modifications copyright (c) 2017-2020, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2021.
|
||||
// Modifications copyright (c) 2017-2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@ -145,7 +145,7 @@ struct factory_key<srs::detail::proj4_parameters>
|
||||
{
|
||||
return par.id.name;
|
||||
}
|
||||
static const char* get(const char* name, srs::dpar::value_proj id)
|
||||
static const char* get(const char* name, srs::dpar::value_proj )
|
||||
{
|
||||
return name;
|
||||
}
|
||||
@ -160,7 +160,7 @@ struct factory_key<srs::dpar::parameters<T> >
|
||||
{
|
||||
return par.id.id;
|
||||
}
|
||||
static srs::dpar::value_proj get(const char* name, srs::dpar::value_proj id)
|
||||
static srs::dpar::value_proj get(const char* , srs::dpar::value_proj id)
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2017, 2018, 2019.
|
||||
// Modifications copyright (c) 2017-2019, Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2017-2021.
|
||||
// Modifications copyright (c) 2017-2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@ -287,7 +287,7 @@ namespace projections
|
||||
|
||||
// Interrupted Goode Homolosine
|
||||
template <typename Params, typename Parameters, typename T>
|
||||
inline void setup_igh(Params const& params, Parameters& par, par_igh<T, Parameters>& proj_parm)
|
||||
inline void setup_igh(Params const& , Parameters& par, par_igh<T, Parameters>& proj_parm)
|
||||
{
|
||||
static const T d0 = 0;
|
||||
static const T d4044118 = igh::d4044118<T>();
|
||||
|
@ -1,15 +1,17 @@
|
||||
// Boost.Geometry (aka GGL, Generic Geometry Library)
|
||||
// Unit Test
|
||||
|
||||
// Copyright (c) 2014, Oracle and/or its affiliates.
|
||||
|
||||
// Copyright (c) 2014-2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
// http://www.boost.org/users/license.html
|
||||
|
||||
#include <test_geometries/custom_lon_lat_point.hpp>
|
||||
|
||||
#include <boost/core/ignore_unused.hpp>
|
||||
|
||||
#include <boost/geometry/core/cs.hpp>
|
||||
#include <boost/geometry/geometries/point.hpp>
|
||||
#include <boost/geometry/geometries/concepts/check.hpp>
|
||||
@ -22,5 +24,7 @@ int main()
|
||||
{
|
||||
bg::model::point<double, 2, bg::cs::spherical_equatorial<double> > p;
|
||||
|
||||
boost::ignore_unused(p);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
|
||||
|
||||
// This file was modified by Oracle on 2021.
|
||||
// Modifications copyright (c) 2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@ -31,7 +35,7 @@ BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
|
||||
BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::deque)
|
||||
|
||||
|
||||
template <typename G, int Expected>
|
||||
template <typename G, size_t Expected>
|
||||
void test_geometry()
|
||||
{
|
||||
BOOST_CHECK_EQUAL(bg::dimension<G>::type::value, Expected);
|
||||
@ -66,9 +70,9 @@ int test_main(int, char* [])
|
||||
test_geometry<boost::tuple<double, double>, 2>();
|
||||
test_geometry<boost::tuple<double, double, double>, 3>();
|
||||
|
||||
test_all<bg::model::point<int, 2, bg::cs::cartesian>, 2 >();
|
||||
test_all<bg::model::point<float, 2, bg::cs::cartesian>, 2 >();
|
||||
test_all<bg::model::point<double, 2, bg::cs::cartesian>, 2 >();
|
||||
test_all<bg::model::point<int, 2, bg::cs::cartesian>, 2>();
|
||||
test_all<bg::model::point<float, 2, bg::cs::cartesian>, 2>();
|
||||
test_all<bg::model::point<double, 2, bg::cs::cartesian>, 2>();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Boost.Geometry
|
||||
|
||||
// Copyright (c) 2019, Oracle and/or its affiliates.
|
||||
|
||||
// Copyright (c) 2019-2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Licensed under the Boost Software License version 1.0.
|
||||
@ -33,7 +32,7 @@ template
|
||||
struct call_equals
|
||||
{
|
||||
template <typename S>
|
||||
static void apply(G1 const& g1, G2 const& g2, S const& s) {}
|
||||
static void apply(G1 const& , G2 const& , S const& ) {}
|
||||
};
|
||||
|
||||
template <typename G1, typename G2, std::size_t Dim>
|
||||
@ -56,7 +55,7 @@ template
|
||||
struct call_overlaps
|
||||
{
|
||||
template <typename S>
|
||||
static void apply(G1 const& g1, G2 const& g2, S const& s) {}
|
||||
static void apply(G1 const& , G2 const& , S const& ) {}
|
||||
};
|
||||
|
||||
template <typename G1, typename G2, std::size_t Dim>
|
||||
@ -89,7 +88,7 @@ template <typename G1, typename G2>
|
||||
struct call_touches<G1, G2, 0, 0>
|
||||
{
|
||||
template <typename S>
|
||||
static void apply(G1 const& g1, G2 const& g2, S const& s) {}
|
||||
static void apply(G1 const& , G2 const& , S const& ) {}
|
||||
};
|
||||
|
||||
template
|
||||
@ -112,14 +111,14 @@ template <typename G1, typename G2>
|
||||
struct call_crosses<G1, G2, 0, 0>
|
||||
{
|
||||
template <typename S>
|
||||
static void apply(G1 const& g1, G2 const& g2, S const& s) {}
|
||||
static void apply(G1 const& , G2 const& , S const& ) {}
|
||||
};
|
||||
|
||||
template <typename G1, typename G2>
|
||||
struct call_crosses<G1, G2, 2, 2>
|
||||
{
|
||||
template <typename S>
|
||||
static void apply(G1 const& g1, G2 const& g2, S const& s) {}
|
||||
static void apply(G1 const& , G2 const& , S const& ) {}
|
||||
};
|
||||
|
||||
template <typename G1, typename G2, typename S>
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
// Copyright (c) 2014-2015 Adam Wulkiewicz, Lodz, Poland.
|
||||
|
||||
// This file was modified by Oracle on 2020.
|
||||
// Modifications copyright (c) 2020 Oracle and/or its affiliates.
|
||||
// This file was modified by Oracle on 2020-2021.
|
||||
// Modifications copyright (c) 2020-2021 Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
@ -237,7 +237,7 @@ void test_sanity_check()
|
||||
|
||||
V v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
|
||||
//v = boost::assign::list_of(P(1, 1))(P(2, 2))(P(3, 3));
|
||||
v.empty();
|
||||
//v.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,10 @@
|
||||
|
||||
// Copyright (c) 2020 Digvijay Janartha, Hamirpur, India.
|
||||
|
||||
// This file was modified by Oracle on 2021.
|
||||
// Modifications copyright (c) 2021, Oracle and/or its affiliates.
|
||||
// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
@ -27,10 +31,6 @@
|
||||
BOOST_GEOMETRY_REGISTER_C_ARRAY_CS(cs::cartesian)
|
||||
BOOST_GEOMETRY_REGISTER_BOOST_TUPLE_CS(cs::cartesian)
|
||||
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
#include <initializer_list>
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
|
||||
template <typename P>
|
||||
bg::model::polygon<P> create_polygon()
|
||||
{
|
||||
@ -111,13 +111,11 @@ void test_all()
|
||||
template <typename P>
|
||||
void test_custom_polygon(bg::model::ring<P> IL)
|
||||
{
|
||||
#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
std::initializer_list<bg::model::ring<P> > RIL = {IL};
|
||||
bg::model::polygon<P> pl1(RIL);
|
||||
std::ostringstream out;
|
||||
out << bg::dsv(pl1);
|
||||
BOOST_CHECK_EQUAL(out.str(), "(((3, 3), (3, 0), (0, 0), (0, 3), (3, 3)))");
|
||||
#endif//BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
}
|
||||
|
||||
template <typename P>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <boost/geometry/util/algorithm.hpp>
|
||||
|
||||
|
||||
void test_dimension(bg::util::index_constant<0> index)
|
||||
void test_dimension(bg::util::index_constant<0>)
|
||||
{
|
||||
bool called = false;
|
||||
bg::detail::for_each_index<0>([&](auto index) { called = true; });
|
||||
|
Loading…
x
Reference in New Issue
Block a user