From c284b3e7c3e84cece98d23e7b7a6bddc55f5f802 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 2 Nov 2007 20:54:19 +0000 Subject: [PATCH] Quote the "Working Draft, Standard for Programming Language C++" on a point I wasn't sure about. git-svn-id: http://svn.voria.com/code@1106 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/synfigapp/blineconvert.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp index 45ab5fc..2b29594 100644 --- a/synfig-studio/trunk/src/synfigapp/blineconvert.cpp +++ b/synfig-studio/trunk/src/synfigapp/blineconvert.cpp @@ -602,7 +602,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(); -- 2.7.4