Remove unreachable assert

This commit is contained in:
wangqr 2020-06-01 22:33:01 -04:00
parent 6028c7f6cb
commit 809b789b61
4 changed files with 2 additions and 6 deletions

View file

@ -184,7 +184,6 @@ void tagless_find_helper::map_range(size_t &s, size_t &e) {
continue; continue;
} }
assert(block.first > s);
// Blocks after the match are irrelevant // Blocks after the match are irrelevant
if (block.first >= e) break; if (block.first >= e) break;

View file

@ -219,7 +219,6 @@ void AudioSpectrumRenderer::Render(wxBitmap &bmp, int start, AudioRenderingStyle
int end = start + bmp.GetWidth(); int end = start + bmp.GetWidth();
assert(start >= 0); assert(start >= 0);
assert(end >= 0);
assert(end >= start); assert(end >= start);
// Prepare an image buffer to write // Prepare an image buffer to write

View file

@ -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))); 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; return 0;
} }

View file

@ -246,7 +246,8 @@ struct parsed_line {
shift += 2; shift += 2;
blocks = line->ParseTags(); blocks = line->ParseTags();
} }
else if (ovr) { else {
// We've reached here, ovr cannot be null
std::string alt; std::string alt;
if (tag == "\\c") alt = "\\1c"; if (tag == "\\c") alt = "\\1c";
// Remove old of same // Remove old of same
@ -270,8 +271,6 @@ struct parsed_line {
line->UpdateText(blocks); line->UpdateText(blocks);
} }
else
assert(false);
return shift; return shift;
} }