X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fblineconvert.cpp;h=71214c9055ac73964d4efe7033c5b801bcb917e2;hb=0b9725d16c8d5204b5e8f6557e97caf5aa328d9e;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..71214c9 100644 --- a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp +++ b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp @@ -39,6 +39,8 @@ #include #include +#include "general.h" + #endif /* === U S I N G =========================================================== */ @@ -602,7 +604,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();