X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fblineconvert.cpp;h=957e667a75740114e147db934044967da1a6fad0;hb=d15c4522466bedfbe61620c401becae0931854f5;hp=45ab5fcd48a2d9df09fca0e428c5d41bf29da140;hpb=3cc0ca894a70090b26789e4c85fd25db035b6673;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp index 45ab5fc..957e667 100644 --- a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp +++ b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -39,6 +40,8 @@ #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -387,7 +390,7 @@ synfigapp::BLineConverter::clear() } void -synfigapp::BLineConverter::operator () (std::list &out, const std::list &in,const std::list &in_w) +synfigapp::BLineConverter::operator()(std::list &out, const std::list &in,const std::list &in_w) { //Profiling information /*etl::clock::value_type initialprocess=0, curveval=0, breakeval=0, disteval=0; @@ -602,7 +605,22 @@ synfigapp::BLineConverter::operator () (std::list &out, cons gaussian_blur_3(ftemp.begin(),ftemp.end(),false); df.resize(size); + + // Wondering whether the modification of the df vector + // using a char* pointer and pointer arithmetric was safe, + // I looked it up... + // + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2369.pdf tells me: + // + // 23.2.5 Class template vector [vector] + // + // [...] The elements of a vector are stored contiguously, + // meaning that if v is a vector where T is + // some type other than bool, then it obeys the identity + // &v[n] == &v[0] + n for all 0 <= n < v.size(). + // GetFirstDerivatives(ftemp,0,size,(char*)&df[0],sizeof(df[0])); + //GetSimpleDerivatives(ftemp,0,size,df,0,di); //< don't have to worry about indexing stuff as it is all being taken care of right now //preproceval += timer();