diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-24 20:10:45 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-10-24 20:10:45 +0400 |
commit | bc1b41eca5eeb0e4013371e2d3fc1b283254fa14 (patch) | |
tree | b73c3c7fda1b02a521901f0e1088d1c5a5b98b73 /source/blender | |
parent | 3b2515ba0e71aeefb7ba43d7cede9fb05259b7f6 (diff) |
* Another attempt to fix the bug partly addressed in revision 31419.
* Fix for the missing function declaration of strcpy. This caused
a linker error in the Debug build with x64 VC 2008 and CMake.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 1 | ||||
-rwxr-xr-x | source/blender/freestyle/intern/stroke/Curve.cpp | 25 |
2 files changed, 22 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index ba2e150deac..4b12473eda2 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -30,6 +30,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "MEM_guardedalloc.h" diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index 92af05bf6e7..5d5cfd98cdc 100755 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -84,8 +84,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) __B = iB->A(); _t2d = t3; } - else if(iA->A() == iB->A() || (iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6)) + else if(iA->A() == iB->A()) { +iA_A_eq_iB_A: if(iA->t2d() == 0){ __A = iB->A(); __B = iB->B(); @@ -96,8 +97,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) _t2d = t3; } } - else if(iA->B() == iB->B() || (iA->B() != 0 && iB->B() != 0 && (iA->B()->point3d() - iB->B()->point3d()).norm() < 1e-6)) + else if(iA->B() == iB->B()) { +iA_B_eq_iB_B: if(iA->t2d() == 1){ __A = iB->A(); __B = iB->B(); @@ -108,8 +110,9 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) _t2d = t3; } } - else if(iA->B() == iB->A() || (iA->B() != 0 && iB->A() != 0 && (iA->B()->point3d() - iB->A()->point3d()).norm() < 1e-6)) + else if(iA->B() == iB->A()) { +iA_B_eq_iB_A: if((iA->t2d() != 1.f) && (iB->t2d() == 0.f)) { __A = iA->A(); @@ -124,7 +127,21 @@ CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3) //_t2d = t3; _t2d=t2*t3; } - + } + else if(iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6) + { + goto iA_A_eq_iB_A; + } + else if(iA->B() != 0 && iB->B() != 0 && (iA->B()->point3d() - iB->B()->point3d()).norm() < 1e-6) + { + goto iA_B_eq_iB_B; + } + else if(iA->B() != 0 && iB->A() != 0 && (iA->B()->point3d() - iB->A()->point3d()).norm() < 1e-6) + { + goto iA_B_eq_iB_A; + } + if (!__A || !__B) { + cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl; } assert(__A != 0 && __B != 0); |