diff options
4 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c index 975a29851db..0425ec58f83 100644 --- a/source/blender/editors/space_node/node_add.c +++ b/source/blender/editors/space_node/node_add.c @@ -445,6 +445,8 @@ static int new_node_tree_exec(bContext *C, wmOperator *op) } else if (snode) idname = snode->tree_idname; + else + return OPERATOR_CANCELLED; if (RNA_struct_property_is_set(op->ptr, "name")) { RNA_string_get(op->ptr, "name", treename); diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c index 30ba4108143..f5f0493e9c9 100644 --- a/source/blender/editors/space_node/node_group.c +++ b/source/blender/editors/space_node/node_group.c @@ -338,8 +338,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode) /* if group output is not externally linked, * convert the constant input value to ensure somewhat consistent behavior */ if (num_external_links == 0) { - bNodeSocket *sock = node_group_find_input_socket(gnode, identifier); - BLI_assert(sock); + /* XXX TODO bNodeSocket *sock = node_group_find_input_socket(gnode, identifier); + BLI_assert(sock);*/ /* XXX TODO nodeSocketCopy(ntree, link->tosock->new_sock, link->tonode->new_node, ntree, sock, gnode);*/ } @@ -366,8 +366,8 @@ static int node_group_ungroup(bNodeTree *ntree, bNode *gnode) /* if group output is not internally linked, * convert the constant output value to ensure somewhat consistent behavior */ if (num_internal_links == 0) { - bNodeSocket *sock = node_group_find_output_socket(gnode, identifier); - BLI_assert(sock); + /* XXX TODO bNodeSocket *sock = node_group_find_output_socket(gnode, identifier); + BLI_assert(sock);*/ /* XXX TODO nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode); */ } diff --git a/source/blender/freestyle/intern/image/GaussianFilter.h b/source/blender/freestyle/intern/image/GaussianFilter.h index b300ec00989..02c2a917bde 100644 --- a/source/blender/freestyle/intern/image/GaussianFilter.h +++ b/source/blender/freestyle/intern/image/GaussianFilter.h @@ -125,10 +125,6 @@ protected: */ -#ifdef __MACH__ -# define sqrtf(x) (sqrt(x)) -#endif - template<class Map> float GaussianFilter::getSmoothedPixel(Map *map, int x, int y) { 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(); |