From e4916b98a758b4ab0c11da9ee675f8d8ea7f7b9f Mon Sep 17 00:00:00 2001 From: jiho-sf Date: Mon, 20 Aug 2007 07:48:49 +0000 Subject: [PATCH] committed patch 1777220 by John Faith to fix compilation of Inkscape on OS X 10.3 (Panther) g_return_val_if_fail(fabs(denom) > 1e-6, NR::Nothing()); is apparently causing gcc 3.3 to fail (OS X 10.3) with the error: line-geometry.cpp: In member function `virtual NR::Maybe Box3D::Line::intersect(const Box3D::Line&)': line-geometry.cpp:57: error: parse error before `;' token If the NR::Nothing() is simply broken out as its own variable instead of including it in g_return_val_if_fail(), then the file compiles. The root cause is not known, but I assume this is a gcc bug. This was the only source change needed for building svn 15634 for OS X 10.3. --- src/line-geometry.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/line-geometry.cpp b/src/line-geometry.cpp index d7b5fb2ec..f6f411bff 100644 --- a/src/line-geometry.cpp +++ b/src/line-geometry.cpp @@ -54,7 +54,8 @@ Line &Line::operator=(Line const &line) { NR::Maybe Line::intersect(Line const &line) { NR::Coord denom = NR::dot(v_dir, line.normal); - g_return_val_if_fail(fabs(denom) > 1e-6, NR::Nothing()); + NR::Maybe no_point = NR::Nothing(); + g_return_val_if_fail(fabs(denom) > 1e-6, no_point ); NR::Coord lambda = (line.d0 - NR::dot(pt, line.normal)) / denom; return pt + lambda * v_dir; -- 2.30.2