From 303a7ad149b9732002e17d3068208ce2e27a262f Mon Sep 17 00:00:00 2001 From: Oliver Duis Date: Thu, 23 Jun 2011 19:10:01 +0200 Subject: [PATCH] Fixed a crash on some builds see issue 793 --- rtengine/fast_demo.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/rtengine/fast_demo.cc b/rtengine/fast_demo.cc index d12c47429..12198306d 100644 --- a/rtengine/fast_demo.cc +++ b/rtengine/fast_demo.cc @@ -25,22 +25,17 @@ //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -//static float *dirwt; -static LUTf dirwt (0x10000); +static LUTf dirwt; static void __attribute__((constructor)) setup_dirwt() { - //dirwt = new float[0x10000]; + dirwt (0x10000); + //set up directional weight function for (int i=0; i<0x10000; i++) dirwt[i] = 1.0/SQR(1.0+i); } -/*static void __attribute__((destructor)) cleanup_dirwt() -{ - delete [] dirwt; -}*/ - void RawImageSource::fast_demo(int winx, int winy, int winw, int winh) { //int winx=0, winy=0; //int winw=W, winh=H;