|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76839 - in sandbox/gtl: boost/polygon boost/polygon/detail libs/polygon/test
From: sydorchuk.andriy_at_[hidden]
Date: 2012-02-02 08:45:01
Author: asydorchuk
Date: 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
New Revision: 76839
URL: http://svn.boost.org/trac/boost/changeset/76839
Log:
Fixing build on Linux.
Text files modified:
sandbox/gtl/boost/polygon/detail/voronoi_ctypes.hpp | 3 +--
sandbox/gtl/boost/polygon/detail/voronoi_predicates.hpp | 20 ++++++++++----------
sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp | 2 +-
sandbox/gtl/boost/polygon/voronoi_builder.hpp | 4 ++--
sandbox/gtl/libs/polygon/test/voronoi_ctypes_test.cpp | 12 +++++++-----
sandbox/gtl/libs/polygon/test/voronoi_robust_fpt_test.cpp | 2 +-
sandbox/gtl/libs/polygon/test/voronoi_structures_test.cpp | 6 +++---
sandbox/gtl/libs/polygon/test/voronoi_test_helper.hpp | 2 +-
8 files changed, 26 insertions(+), 25 deletions(-)
Modified: sandbox/gtl/boost/polygon/detail/voronoi_ctypes.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/voronoi_ctypes.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/voronoi_ctypes.hpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -688,8 +688,7 @@
return that.d();
}
- template <>
- fpt64 operator()< extended_exponent_fpt<fpt64> >(const extended_exponent_fpt<fpt64>& that) const {
+ fpt64 operator()(const extended_exponent_fpt<fpt64>& that) const {
return that.d();
}
};
Modified: sandbox/gtl/boost/polygon/detail/voronoi_predicates.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/voronoi_predicates.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/voronoi_predicates.hpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -162,34 +162,34 @@
}
bool operator()(const site_type &lhs, const circle_type &rhs) const {
- ulp_cmp_type::kResult xCmp =
+ typename ulp_cmp_type::kResult xCmp =
ulp_cmp(to_fpt(lhs.x()), to_fpt(rhs.lower_x()), ULPS);
if (xCmp != ulp_cmp_type::EQUAL) {
return xCmp == ulp_cmp_type::LESS;
}
- ulp_cmp_type::kResult yCmp =
+ typename ulp_cmp_type::kResult yCmp =
ulp_cmp(to_fpt(lhs.y()), to_fpt(rhs.lower_y()), ULPS);
return yCmp == ulp_cmp_type::LESS;
}
bool operator()(const circle_type &lhs, const site_type &rhs) const {
- ulp_cmp_type::kResult xCmp =
+ typename ulp_cmp_type::kResult xCmp =
ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.x()), ULPS);
if (xCmp != ulp_cmp_type::EQUAL) {
return xCmp == ulp_cmp_type::LESS;
}
- ulp_cmp_type::kResult yCmp =
+ typename ulp_cmp_type::kResult yCmp =
ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.y()), ULPS);
return yCmp == ulp_cmp_type::LESS;
}
bool operator()(const circle_type &lhs, const circle_type &rhs) const {
- ulp_cmp_type::kResult xCmp =
+ typename ulp_cmp_type::kResult xCmp =
ulp_cmp(to_fpt(lhs.lower_x()), to_fpt(rhs.lower_x()), ULPS);
if (xCmp != ulp_cmp_type::EQUAL) {
return xCmp == ulp_cmp_type::LESS;
}
- ulp_cmp_type::kResult yCmp =
+ typename ulp_cmp_type::kResult yCmp =
ulp_cmp(to_fpt(lhs.lower_y()), to_fpt(rhs.lower_y()), ULPS);
return yCmp == ulp_cmp_type::LESS;
}
@@ -351,7 +351,7 @@
return LESS;
return UNDEFINED;
} else {
- ot::kResult orientation = ot::eval(a, b, dif_x, dif_y);
+ typename ot::kResult orientation = ot::eval(a, b, dif_x, dif_y);
if (orientation == ot::LEFT) {
if (!right_site.is_inverse())
return reverse_order ? LESS : UNDEFINED;
@@ -361,7 +361,7 @@
fpt_type fast_left_expr = a * (dif_y + dif_x) * (dif_y - dif_x);
fpt_type fast_right_expr = (to_fpt(2.0) * b) * dif_x * dif_y;
- ulp_cmp_type::kResult expr_cmp = ulp_cmp(fast_left_expr, fast_right_expr, 4);
+ typename ulp_cmp_type::kResult expr_cmp = ulp_cmp(fast_left_expr, fast_right_expr, 4);
if (expr_cmp != ulp_cmp_type::EQUAL) {
if ((expr_cmp == ulp_cmp_type::MORE) ^ reverse_order)
return reverse_order ? LESS : MORE;
@@ -466,9 +466,9 @@
const site_type &site3,
int segment_index) const {
if (segment_index != 2) {
- ot::kResult orient1 = ot::eval(site1.point0(),
+ typename ot::kResult orient1 = ot::eval(site1.point0(),
site2.point0(), site3.point0(true));
- ot::kResult orient2 = ot::eval(site1.point0(),
+ typename ot::kResult orient2 = ot::eval(site1.point0(),
site2.point0(), site3.point1(true));
if (segment_index == 1 && site1.x0() >= site2.x0()) {
if (orient1 != ot::RIGHT)
Modified: sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp (original)
+++ sandbox/gtl/boost/polygon/detail/voronoi_structures.hpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -212,7 +212,7 @@
private:
enum kBits {
IS_INVERSE = 1,
- IS_INITIAL_DIRECTION = 2,
+ IS_INITIAL_DIRECTION = 2
};
point_type point0_;
Modified: sandbox/gtl/boost/polygon/voronoi_builder.hpp
==============================================================================
--- sandbox/gtl/boost/polygon/voronoi_builder.hpp (original)
+++ sandbox/gtl/boost/polygon/voronoi_builder.hpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -470,7 +470,7 @@
std::pair<edge_type*, edge_type*> edges =
output->insert_new_edge(site_arc2, site_event);
position = beach_line_.insert(position,
- beach_line_type::value_type(new_right_node, value_type(edges.second)));
+ typename beach_line_type::value_type(new_right_node, value_type(edges.second)));
if (site_event.is_segment()) {
// Update the beach line with temporary bisector, that will
@@ -486,7 +486,7 @@
}
position = beach_line_.insert(position,
- beach_line_type::value_type(new_left_node, value_type(edges.first)));
+ typename beach_line_type::value_type(new_left_node, value_type(edges.first)));
return position;
}
Modified: sandbox/gtl/libs/polygon/test/voronoi_ctypes_test.cpp
==============================================================================
--- sandbox/gtl/libs/polygon/test/voronoi_ctypes_test.cpp (original)
+++ sandbox/gtl/libs/polygon/test/voronoi_ctypes_test.cpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -23,8 +23,9 @@
ulp_comparison<double> ulp_cmp;
uint64 a = 22;
uint64 b = 27;
- fpt64 da = *reinterpret_cast<fpt64*>(&a);
- fpt64 db = *reinterpret_cast<fpt64*>(&b);
+ fpt64 da, db;
+ memcpy(&da, &a, sizeof(uint64));
+ memcpy(&db, &b, sizeof(uint64));
BOOST_CHECK_EQUAL(ulp_cmp(da, db, 1), ulp_cmp.LESS);
BOOST_CHECK_EQUAL(ulp_cmp(db, da, 1), ulp_cmp.MORE);
BOOST_CHECK_EQUAL(ulp_cmp(da, db, 4), ulp_cmp.LESS);
@@ -36,8 +37,9 @@
ulp_comparison<fpt64> ulp_cmp;
uint64 a = 0ULL;
uint64 b = 0x8000000000000002ULL;
- fpt64 da = *reinterpret_cast<fpt64*>(&a);
- fpt64 db = *reinterpret_cast<fpt64*>(&b);
+ fpt64 da, db;
+ memcpy(&da, &a, sizeof(uint64));
+ memcpy(&db, &b, sizeof(uint64));
BOOST_CHECK_EQUAL(ulp_cmp(da, db, 1), ulp_cmp.MORE);
BOOST_CHECK_EQUAL(ulp_cmp(db, da, 1), ulp_cmp.LESS);
BOOST_CHECK_EQUAL(ulp_cmp(da, db, 2), ulp_cmp.EQUAL);
@@ -180,7 +182,7 @@
BOOST_AUTO_TEST_CASE(extended_int_test2) {
typedef extended_int<2> eint64;
int64 val64 = 0x7fffffffffffffffLL;
- eint64 e1(0LL), e2(32LL), e3(-32LL), e4(val64), e5(-val64);
+ eint64 e1(0), e2(32), e3(-32), e4(val64), e5(-val64);
BOOST_CHECK_EQUAL(e1.count(), 0);
BOOST_CHECK_EQUAL(e2.count(), 1);
BOOST_CHECK_EQUAL(e2.chunks()[0], 32U);
Modified: sandbox/gtl/libs/polygon/test/voronoi_robust_fpt_test.cpp
==============================================================================
--- sandbox/gtl/libs/polygon/test/voronoi_robust_fpt_test.cpp (original)
+++ sandbox/gtl/libs/polygon/test/voronoi_robust_fpt_test.cpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -305,7 +305,7 @@
uint32 mask = (1 << MX_SQRTS);
for (size_t i = 0; i < mask; i++) {
fpt64 expected_val = 0.0;
- for (int j = 0; j < MX_SQRTS; j++) {
+ for (size_t j = 0; j < MX_SQRTS; j++) {
if (i & (1 << j)) {
A[j] = a[j];
B[j] = b[j];
Modified: sandbox/gtl/libs/polygon/test/voronoi_structures_test.cpp
==============================================================================
--- sandbox/gtl/libs/polygon/test/voronoi_structures_test.cpp (original)
+++ sandbox/gtl/libs/polygon/test/voronoi_structures_test.cpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -64,15 +64,15 @@
s.index(27);
BOOST_CHECK(s.is_initial());
BOOST_CHECK(s.has_initial_direction());
- BOOST_CHECK_EQUAL(s.index(), 27);
+ BOOST_CHECK(s.index() == 27);
s.inverse();
BOOST_CHECK(!s.has_initial_direction());
BOOST_CHECK(s.is_initial());
- BOOST_CHECK_EQUAL(s.index(), 27);
+ BOOST_CHECK(s.index() == 27);
s.change_initial_direction();
BOOST_CHECK(s.has_initial_direction());
BOOST_CHECK(!s.is_initial());
- BOOST_CHECK_EQUAL(s.index(), 27);
+ BOOST_CHECK(s.index() == 27);
}
BOOST_AUTO_TEST_CASE(circle_event_test) {
Modified: sandbox/gtl/libs/polygon/test/voronoi_test_helper.hpp
==============================================================================
--- sandbox/gtl/libs/polygon/test/voronoi_test_helper.hpp (original)
+++ sandbox/gtl/libs/polygon/test/voronoi_test_helper.hpp 2012-02-02 08:44:59 EST (Thu, 02 Feb 2012)
@@ -183,7 +183,7 @@
INCIDENT_EDGES_CCW_ORDER = 4,
NO_HALF_EDGE_INTERSECTIONS = 8,
FAST_VERIFICATION = 7,
- COMPLETE_VERIFICATION = 15,
+ COMPLETE_VERIFICATION = 15
};
template <typename Output>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk