Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-16 03:12:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-16 03:12:49 +0400
commitf4fe1b8e77e443b899466acd951628a2f68e5049 (patch)
tree432b18e28ec39e2882c325a3221e7b6adf7d6876 /source/blender/freestyle/intern/stroke/Stroke.cpp
parentafb4b65167165613f177a531bd3d4dcb3649c1c6 (diff)
Fix a few warnings. One was an actual bug in freestyle where stroke attributes
were not properly interpolated.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Stroke.cpp')
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index a0b75241066..79443742573 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -113,8 +113,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
if (a1._userAttributesReal->size() == a2._userAttributesReal->size()) {
_userAttributesReal = new realMap;
realMap::iterator it1 = a1._userAttributesReal->begin(), it1end = a1._userAttributesReal->end();
- realMap::iterator it2 = a2._userAttributesReal->begin(), it2end = a2._userAttributesReal->end();
- for (; it1 != it1end; ++it1) {
+ realMap::iterator it2 = a2._userAttributesReal->begin();
+ for (; it1 != it1end; ++it1, ++it2) {
(*_userAttributesReal)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
}
}
@@ -126,8 +126,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
if (a1._userAttributesVec2f->size() == a2._userAttributesVec2f->size()) {
_userAttributesVec2f = new Vec2fMap;
Vec2fMap::iterator it1 = a1._userAttributesVec2f->begin(), it1end = a1._userAttributesVec2f->end();
- Vec2fMap::iterator it2 = a2._userAttributesVec2f->begin(), it2end = a2._userAttributesVec2f->end();
- for (; it1 != it1end; ++it1) {
+ Vec2fMap::iterator it2 = a2._userAttributesVec2f->begin();
+ for (; it1 != it1end; ++it1, ++it2) {
(*_userAttributesVec2f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
}
}
@@ -139,8 +139,8 @@ StrokeAttribute::StrokeAttribute(const StrokeAttribute& a1, const StrokeAttribut
if (a1._userAttributesVec3f->size() == a2._userAttributesVec3f->size()) {
_userAttributesVec3f = new Vec3fMap;
Vec3fMap::iterator it1 = a1._userAttributesVec3f->begin(), it1end = a1._userAttributesVec3f->end();
- Vec3fMap::iterator it2 = a2._userAttributesVec3f->begin(), it2end = a2._userAttributesVec3f->end();
- for (; it1 != it1end; ++it1) {
+ Vec3fMap::iterator it2 = a2._userAttributesVec3f->begin();
+ for (; it1 != it1end; ++it1, ++it2) {
(*_userAttributesVec3f)[(*it1).first] = ((1 - t) * (*it1).second + t * (*it2).second);
}
}
@@ -659,8 +659,6 @@ void Stroke::RemoveVertex(StrokeVertex *iVertex)
void Stroke::InsertVertex(StrokeVertex *iVertex, StrokeInternal::StrokeVertexIterator next)
{
- vertex_container::iterator it = _Vertices.begin(), itend = _Vertices.end();
-
vertex_container::iterator itnext = next.getIt();
_Vertices.insert(itnext, iVertex);
UpdateLength();