diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-09 02:24:41 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-12-09 02:24:41 +0400 |
commit | 3c4987f98378d44eda133311c65aa19412e4cd38 (patch) | |
tree | 4371b4117d3290e60a58190481e926ebb17fcf28 /source/blender/freestyle/intern/stroke | |
parent | ec33687d6cf74775e37fdc1a14e22dea08289cb1 (diff) |
Fix for a number of compiler warnings as well as a bug hidden by the warnings.
Patch contribution by Bastien Montagne, thanks!
Diffstat (limited to 'source/blender/freestyle/intern/stroke')
4 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp index 697531b383f..7ee5762a70f 100755 --- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp @@ -245,7 +245,7 @@ void Smoother::smooth(int nbIteration, real iFactorPoint, real ifactorCurvature, copyVertices(); } -real edgeStopping (real x, real sigma) +static real edgeStopping (real x, real sigma) { if (sigma==0.0) return 1.0; return exp(-x*x/(sigma*sigma)); diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp index 321dd5fe41f..eea6da40c9f 100755 --- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp +++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.cpp @@ -50,7 +50,7 @@ extern "C" { // (*oArray)[i] = ((float)qBlue(rgb))/255.f; // } // } -void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) { +static void convert(ImBuf *imBuf, float **oArray, unsigned &oSize) { oSize = imBuf->x; *oArray = new float[oSize]; diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index 09833bf4b4a..80562e104d2 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -643,8 +643,8 @@ error: #include "CurveIterators.h" // Internal function -int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling, - Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) +static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate1D& pred, float sampling, + Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) { if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){ newChains.push_back(_curve); @@ -796,8 +796,8 @@ int Operators::recursiveSplit(UnaryFunction0D<double>& func, UnaryPredicate1D& p // recursive split with pred 0D -int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling, - Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) +static int __recursiveSplit(Chain *_curve, UnaryFunction0D<double>& func, UnaryPredicate0D& pred0d, UnaryPredicate1D& pred, float sampling, + Operators::I1DContainer& newChains, Operators::I1DContainer& splitted_chains) { if(((_curve->nSegments() == 1) && (sampling == 0)) || (_curve->getLength2D() <= sampling)){ newChains.push_back(_curve); @@ -992,7 +992,7 @@ int Operators::sort(BinaryPredicate1D& pred) { return 0; } -Stroke* createStroke(Interface1D& inter) { +static Stroke* createStroke(Interface1D& inter) { Stroke* stroke = new Stroke; stroke->setId(inter.getId()); diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp index 18142233672..91f9d866c86 100755 --- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp +++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp @@ -78,13 +78,13 @@ Strip::~Strip(){ #define MAX_RATIO_LENGTH_SINGU 2 #define HUGE_COORD 1e4 -bool notValid (Vec2r p) +static bool notValid (Vec2r p) { return (p[0]!=p[0]) || (p[1]!=p[1]) || (fabs(p[0])>HUGE_COORD) || (fabs(p[1])>HUGE_COORD) || (p[0] <-HUGE_COORD) || (p[1]<-HUGE_COORD); } -real crossP(const Vec2r& A, const Vec2r& B){ +static real crossP(const Vec2r& A, const Vec2r& B){ return A[0]*B[1] - A[1]*B[0]; } |