Changeset 649580


Ignore:
Timestamp:
04/27/10 11:00:14 (3 years ago)
Author:
Dan Dennedy <dan@…>
Branches:
b1faa09f4dfcf63d19d2cb9fc598a583e1df1c33
Children:
7186a8
Parents:
a11a00
git-author:
Dan Dennedy <dan@…> (04/27/10 11:00:14)
git-committer:
Dan Dennedy <dan@…> (04/27/10 11:00:14)
Message:

Fix uninitalized variables in C++ filters.

Patch from Burkhard Plaum with note:
This patch fixes some uninitialized variable problems,
which caused valgrind warnings for me. In C all filters are now allocated
with calloc, unfortunately C++ doesn't have a new0 operator :)

It simply sets the values to zero in the constructors. The exception is
water.cpp: The parameter "splash" isn't used at all, so I kicked it out.

Location:
src/filter
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/filter/delay0r/delay0r.cpp

    rfddf16 r649580  
    1111  delay0r(unsigned int width, unsigned int height) 
    1212  { 
     13    delay = 0.0; 
    1314    register_param(delay,"DelayTime","the delay time"); 
    1415  } 
  • src/filter/edgeglow/edgeglow.cpp

    rbab5d1 r649580  
    4040  edgeglow(unsigned int width, unsigned int height) 
    4141  { 
     42    lthresh = 0.0; 
     43    lupscale = 0.0; 
     44    lredscale = 0.0; 
    4245    register_param(lthresh, "lthresh", "threshold for edge lightening"); 
    4346    register_param(lupscale, "lupscale", "multiplier for upscaling edge brightness"); 
  • src/filter/nosync0r/nosync0r.cpp

    rfddf16 r649580  
    99  nosync0r(unsigned int width, unsigned int height) 
    1010  { 
     11    hsync = 0.0; 
    1112    register_param(hsync,"HSync","the hsync offset"); 
    1213  } 
  • src/filter/water/water.cpp

    ra60ec3 r649580  
    6767public: 
    6868 
    69   f0r_param_position splash; 
    7069  f0r_param_double physics; 
    7170  bool rain; 
     
    7776 
    7877  Water(unsigned int width, unsigned int height) { 
    79     register_param(splash, "splash", "make a big splash in the center"); 
     78    physics = 0.0; 
    8079    register_param(physics, "physics", "water density: from 1 to 4"); 
    8180    register_param(rain, "rain", "rain drops all over"); 
Note: See TracChangeset for help on using the changeset viewer.