Skip to content

Commit

Permalink
Update src/aliceVision/hdr/brackets.cpp
Browse files Browse the repository at this point in the history
code simplification

Co-authored-by: Fabien Castan <[email protected]>
  • Loading branch information
demoulinv and fabiencastan authored Dec 23, 2022
1 parent 77053a6 commit c6ba765
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/aliceVision/hdr/brackets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,22 +123,11 @@ void selectTargetViews(std::vector<std::shared_ptr<sfmData::View>> & out_targetV
ALICEVISION_LOG_INFO("offsetRefBracketIndex parameter out of range, read file containing the target index");
std::ifstream file(targetIndexesFilename);
if (!file)
{
return;
}
else
{
std::string line;
if (getline(file, line))
{
targetIndex = atoi(line.c_str());
file.close();
}
else
{
return;
}
}
ALICEVISION_THROW_ERROR("Failed to open file: " << targetIndexesFilename);
std::string line;
if (!std::getline(file, line))
ALICEVISION_THROW_ERROR("Failed to read from file: " << targetIndexesFilename);
targetIndex = atoi(line.c_str());
}

for (auto& group : groups)
Expand Down

0 comments on commit c6ba765

Please sign in to comment.