kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Remove no longer needed explicit initialization and copying
rodzic
4269f67c4a
commit
d3f13839af
|
@ -182,7 +182,7 @@ sanei_genesys_init_structs (Genesys_Device * dev)
|
||||||
{
|
{
|
||||||
if (dev->model->gpo_type == Gpo[i].gpo_id)
|
if (dev->model->gpo_type == Gpo[i].gpo_id)
|
||||||
{
|
{
|
||||||
memcpy (&dev->gpo, &Gpo[i], sizeof (Genesys_Gpo));
|
dev->gpo = Gpo[i];
|
||||||
gpo_ok = 1;
|
gpo_ok = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ sanei_genesys_init_fe (Genesys_Device * dev)
|
||||||
{
|
{
|
||||||
if (dev->model->dac_type == Wolfson[i].fe_id)
|
if (dev->model->dac_type == Wolfson[i].fe_id)
|
||||||
{
|
{
|
||||||
memcpy (&dev->frontend, &Wolfson[i], sizeof (Genesys_Frontend));
|
dev->frontend = Wolfson[i];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2968,7 +2968,7 @@ genesys_restore_calibration (Genesys_Device * dev)
|
||||||
*/
|
*/
|
||||||
if (status == SANE_STATUS_GOOD)
|
if (status == SANE_STATUS_GOOD)
|
||||||
{
|
{
|
||||||
memcpy (&dev->frontend, &cache.frontend, sizeof (dev->frontend));
|
dev->frontend = cache.frontend;
|
||||||
/* we don't restore the gamma fields */
|
/* we don't restore the gamma fields */
|
||||||
dev->sensor.exposure = cache.sensor.exposure;
|
dev->sensor.exposure = cache.sensor.exposure;
|
||||||
|
|
||||||
|
@ -3054,9 +3054,9 @@ genesys_save_calibration (Genesys_Device * dev)
|
||||||
found_cache_it->dark_average_data = dev->dark_average_data;
|
found_cache_it->dark_average_data = dev->dark_average_data;
|
||||||
found_cache_it->white_average_data = dev->white_average_data;
|
found_cache_it->white_average_data = dev->white_average_data;
|
||||||
|
|
||||||
memcpy (&found_cache_it->used_setup, &dev->current_setup, sizeof (found_cache_it->used_setup));
|
found_cache_it->used_setup = dev->current_setup;
|
||||||
memcpy (&found_cache_it->frontend, &dev->frontend, sizeof (found_cache_it->frontend));
|
found_cache_it->frontend = dev->frontend;
|
||||||
memcpy (&found_cache_it->sensor, &dev->sensor, sizeof (found_cache_it->sensor));
|
found_cache_it->sensor = dev->sensor;
|
||||||
|
|
||||||
found_cache_it->calib_pixels = dev->calib_pixels;
|
found_cache_it->calib_pixels = dev->calib_pixels;
|
||||||
found_cache_it->calib_channels = dev->calib_channels;
|
found_cache_it->calib_channels = dev->calib_channels;
|
||||||
|
|
|
@ -1198,10 +1198,10 @@ struct Genesys_Calibration_Cache
|
||||||
~Genesys_Calibration_Cache() = default;
|
~Genesys_Calibration_Cache() = default;
|
||||||
|
|
||||||
// used to check if entry is compatible
|
// used to check if entry is compatible
|
||||||
Genesys_Current_Setup used_setup = {};
|
Genesys_Current_Setup used_setup;
|
||||||
time_t last_calibration = 0;
|
time_t last_calibration = 0;
|
||||||
|
|
||||||
Genesys_Frontend frontend = {};
|
Genesys_Frontend frontend;
|
||||||
Genesys_Sensor sensor;
|
Genesys_Sensor sensor;
|
||||||
|
|
||||||
size_t calib_pixels = 0;
|
size_t calib_pixels = 0;
|
||||||
|
@ -1243,10 +1243,10 @@ struct Genesys_Device
|
||||||
|
|
||||||
Genesys_Register_Set reg;
|
Genesys_Register_Set reg;
|
||||||
Genesys_Register_Set calib_reg;
|
Genesys_Register_Set calib_reg;
|
||||||
Genesys_Settings settings = {};
|
Genesys_Settings settings;
|
||||||
Genesys_Frontend frontend = {};
|
Genesys_Frontend frontend;
|
||||||
Genesys_Sensor sensor;
|
Genesys_Sensor sensor;
|
||||||
Genesys_Gpo gpo = {};
|
Genesys_Gpo gpo;
|
||||||
Genesys_Motor motor;
|
Genesys_Motor motor;
|
||||||
uint16_t slope_table0[256] = {};
|
uint16_t slope_table0[256] = {};
|
||||||
uint16_t slope_table1[256] = {};
|
uint16_t slope_table1[256] = {};
|
||||||
|
@ -1301,7 +1301,7 @@ struct Genesys_Device
|
||||||
size_t wpl = 0;
|
size_t wpl = 0;
|
||||||
|
|
||||||
// contains the real used values
|
// contains the real used values
|
||||||
Genesys_Current_Setup current_setup = {};
|
Genesys_Current_Setup current_setup;
|
||||||
|
|
||||||
// look up table used in dynamic rasterization
|
// look up table used in dynamic rasterization
|
||||||
unsigned char lineart_lut[256] = {};
|
unsigned char lineart_lut[256] = {};
|
||||||
|
|
Ładowanie…
Reference in New Issue