Skip to content

Commit

Permalink
Remove casts to ssize_t
Browse files Browse the repository at this point in the history
ssize_t is not portable, and this still compiles for me.
  • Loading branch information
0-wiz-0 committed Jan 17, 2024
1 parent 319cef3 commit 93df451
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/archive_modify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ bool Archive::commit() {
}

if (is_writable()) {
files.erase(files.begin() + static_cast<ssize_t>(index));
changes.erase(changes.begin() + static_cast<ssize_t>(index));
files.erase(files.begin() + index);
changes.erase(changes.begin() + index);
index--;
}
break;
Expand Down Expand Up @@ -329,8 +329,8 @@ bool Archive::rollback() {
break;

case Change::ADDED:
files.erase(files.begin() + static_cast<ssize_t>(i));
changes.erase(changes.begin() + static_cast<ssize_t>(i));
files.erase(files.begin() + i);
changes.erase(changes.begin() + i);
i--;
break;

Expand Down

0 comments on commit 93df451

Please sign in to comment.