genesys: Fix sensor const safety in *_search_start_position()

merge-requests/137/head
Povilas Kanapickas 2019-08-17 11:05:36 +03:00
rodzic f019f9e7b8
commit 1902c9fbcb
6 zmienionych plików z 16 dodań i 16 usunięć

Wyświetl plik

@ -1813,9 +1813,9 @@ static void gl124_search_start_position(Genesys_Device* dev)
/* sets for a 200 lines * 600 pixels */
/* normal scan with no shading */
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
const auto& sensor = sanei_genesys_find_sensor(dev, dpi, ScanMethod::FLATBED);
ScanSession session;
session.params.xres = dpi;

Wyświetl plik

@ -2110,9 +2110,9 @@ static void gl646_search_start_position(Genesys_Device* dev)
/* we scan at 300 dpi */
resolution = get_closest_resolution(dev->model->ccd_type, 300, 1);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, resolution, ScanMethod::FLATBED);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
const auto& sensor = sanei_genesys_find_sensor(dev, resolution, ScanMethod::FLATBED);
/* fill settings for a gray level scan */
settings.scan_method = ScanMethod::FLATBED;

Wyświetl plik

@ -2892,9 +2892,9 @@ static void gl841_search_start_position(Genesys_Device* dev)
/* sets for a 200 lines * 600 pixels */
/* normal scan with no shading */
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
const auto& sensor = sanei_genesys_find_sensor(dev, dpi, ScanMethod::FLATBED);
ScanSession session;
session.params.xres = dpi;

Wyświetl plik

@ -2234,7 +2234,7 @@ static void gl843_search_start_position(Genesys_Device* dev)
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
const auto& sensor = sanei_genesys_find_sensor(dev, dpi, ScanMethod::FLATBED);
ScanSession session;
session.params.xres = dpi;

Wyświetl plik

@ -1498,9 +1498,9 @@ static void gl846_search_start_position(Genesys_Device* dev)
/* sets for a 200 lines * 600 pixels */
/* normal scan with no shading */
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
const auto& sensor = sanei_genesys_find_sensor(dev, dpi, ScanMethod::FLATBED);
ScanSession session;
session.params.xres = dpi;

Wyświetl plik

@ -1555,9 +1555,9 @@ static void gl847_search_start_position(Genesys_Device* dev)
/* sets for a 200 lines * 600 pixels */
/* normal scan with no shading */
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
auto& sensor = sanei_genesys_find_sensor_for_write(dev, dpi, ScanMethod::FLATBED);
// FIXME: the current approach of doing search only for one resolution does not work on scanners
// whith employ different sensors with potentially different settings.
const auto& sensor = sanei_genesys_find_sensor(dev, dpi, ScanMethod::FLATBED);
ScanSession session;
session.params.xres = dpi;