Skip to content

Commit 75e87b8

Browse files
committed
PR review comment address
Signed-off-by: Aleksandr Motsjonov <[email protected]>
1 parent b84398c commit 75e87b8

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/rawtoaces_core/rawtoaces_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ bool SpectralSolver::calculate_WB()
416416
{
417417
std::cerr << "ERROR: camera needs to be initialised prior to calling "
418418
<< "SpectralSolver::calculate_WB()" << std::endl;
419-
// TODO: Should here be return false?
419+
return false;
420420
}
421421

422422
if ( illuminant.data.count( "main" ) == 0 ||

src/rawtoaces_util/image_converter.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,9 @@ bool prepare_transform_spectral(
338338

339339
success = solver.find_illuminant( tmp_wb_multipliers );
340340

341-
if ( !success )
342-
{
343-
// TODO: Potentially remove, since this code path is not reachable due to camera lookup success in the previous step.
344-
std::cerr << "ERROR: Failed to find a suitable illuminant."
345-
<< std::endl;
346-
return false;
347-
}
341+
// Expected to be true due to camera lookup success in the previous step,
342+
// since lack of camera is the only way for find_illuminant to return false;
343+
assert( success );
348344

349345
if ( settings.verbosity > 0 )
350346
{

0 commit comments

Comments
 (0)