Convert a loop to range-based for.
[movit] / deconvolution_sharpen_effect.h
index 1f68071..d7800df 100644 (file)
@@ -30,20 +30,21 @@ namespace movit {
 class DeconvolutionSharpenEffect : public Effect {
 public:
        DeconvolutionSharpenEffect();
-       virtual std::string effect_type_id() const { return "DeconvolutionSharpenEffect"; }
-       std::string output_fragment_shader();
+       virtual ~DeconvolutionSharpenEffect();
+       std::string effect_type_id() const override { return "DeconvolutionSharpenEffect"; }
+       std::string output_fragment_shader() override;
 
        // Samples a lot of times from its input.
-       virtual bool needs_texture_bounce() const { return true; }
+       bool needs_texture_bounce() const override { return true; }
 
-       virtual void inform_input_size(unsigned input_num, unsigned width, unsigned height)
+       void inform_input_size(unsigned input_num, unsigned width, unsigned height) override
        {
                this->width = width;
                this->height = height;
        }
 
-       void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num);
-       virtual AlphaHandling alpha_handling() const { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
+       void set_gl_state(GLuint glsl_program_num, const std::string &prefix, unsigned *sampler_num) override;
+       AlphaHandling alpha_handling() const override { return INPUT_PREMULTIPLIED_ALPHA_KEEP_BLANK; }
 
 private:
        // Input size.
@@ -66,6 +67,8 @@ private:
        Eigen::MatrixXf g;
        int last_R;
        float last_circle_radius, last_gaussian_radius, last_correlation, last_noise;
+
+       float *uniform_samples;
        
        void update_deconvolution_kernel();
 };