Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Remove unreachable assert
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqr committed Jun 2, 2020
1 parent 7bbba90 commit 0847c17
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion libaegisub/common/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ void tagless_find_helper::map_range(size_t &s, size_t &e) {
continue;
}

assert(block.first > s);
// Blocks after the match are irrelevant
if (block.first >= e) break;

Expand Down
1 change: 0 additions & 1 deletion src/audio_renderer_spectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ void AudioSpectrumRenderer::Render(wxBitmap &bmp, int start, AudioRenderingStyle
int end = start + bmp.GetWidth();

assert(start >= 0);
assert(end >= 0);
assert(end >= start);

// Prepare an image buffer to write
Expand Down
1 change: 0 additions & 1 deletion src/auto4_lua_assfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ namespace Automation4 {
return error(L, "Attempt to index a Subtitle File object with value of type '%s'.", lua_typename(L, lua_type(L, 2)));
}

assert(false);
return 0;
}

Expand Down
5 changes: 2 additions & 3 deletions src/command/edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ struct parsed_line {
shift += 2;
blocks = line->ParseTags();
}
else if (ovr) {
else {
// We've reached here, ovr cannot be null
std::string alt;
if (tag == "\\c") alt = "\\1c";
// Remove old of same
Expand All @@ -270,8 +271,6 @@ struct parsed_line {

line->UpdateText(blocks);
}
else
assert(false);

return shift;
}
Expand Down

0 comments on commit 0847c17

Please sign in to comment.