Fix abuse of array2D<>

- Add copy c'tor and assignment to `array2D<>`
- Use `std::vector<>` instead of smart pointer to array
- Constify a bit
- Make use of `rtengine::max(...)`
This commit is contained in:
Flössie
2020-08-16 11:22:10 +02:00
parent 231c5e2c99
commit 3af822b6f7
3 changed files with 59 additions and 51 deletions

View File

@@ -18,6 +18,8 @@
*/
#pragma once
#include <vector>
#include <gtkmm.h>
#include <glibmm/ustring.h>
@@ -160,13 +162,13 @@ protected:
LUTu rhistRaw, ghistRaw, bhistRaw, lhistRaw; //lhistRaw is unused?
int vectorscope_scale;
array2D<int> vect;
std::unique_ptr<unsigned char[]> vect_buffer;
std::vector<unsigned char> vect_buffer;
bool vect_buffer_dirty;
int vect_buffer_size;
int waveform_scale;
array2D<int> rwave, gwave, bwave, lwave;
std::unique_ptr<unsigned char[]> wave_buffer;
std::unique_ptr<unsigned char[]> wave_buffer_luma;
std::vector<unsigned char> wave_buffer;
std::vector<unsigned char> wave_buffer_luma;
bool wave_buffer_dirty;
bool valid;