summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 502757c)
raw | patch | inline | side by side (parent: 502757c)
author | jiho-sf <jiho-sf@users.sourceforge.net> | |
Mon, 20 Aug 2007 07:48:49 +0000 (07:48 +0000) | ||
committer | jiho-sf <jiho-sf@users.sourceforge.net> | |
Mon, 20 Aug 2007 07:48:49 +0000 (07:48 +0000) |
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<NR::Point>
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.
is apparently causing gcc 3.3 to fail (OS X 10.3) with the error:
line-geometry.cpp: In member function `virtual NR::Maybe<NR::Point>
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 | patch | blob | history |
diff --git a/src/line-geometry.cpp b/src/line-geometry.cpp
index d7b5fb2ecd9bc66022916c2d7c8298f6c8c07a0e..f6f411bff01b79f2b25db100c500573614e5203c 100644 (file)
--- a/src/line-geometry.cpp
+++ b/src/line-geometry.cpp
NR::Maybe<NR::Point> 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<NR::Point> 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;