Commit 890ec1ed authored by Sébastien Le Stum's avatar Sébastien Le Stum

archiver: clarify usage of past-the-end iterator

Previous implementation was introducing ambiguity on a
potential off-by-one.

Rework the statement so it is clear that char_file_end
is to be considered as collection's end().

Change-Id: I7af6f9333c80c8a897ff21ca5ccfe2a2c268546d
parent ed55f284
......@@ -202,7 +202,7 @@ importAccounts(const std::string& archivePath, const std::string& password)
try {
const auto* char_file_begin = reinterpret_cast<const char*>(&file[0]);
const auto* char_file_end = reinterpret_cast<const char*>(&file[file.size()]);
const auto* char_file_end = char_file_begin + file.size();
// Add
std::string err;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment