Fix and refactor TheoryStrings::checkFlatForms() (#3326)
authorAndres Noetzli <andres.noetzli@gmail.com>
Fri, 1 Nov 2019 18:58:57 +0000 (11:58 -0700)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2019 18:58:57 +0000 (11:58 -0700)
commit86c541cdf83e0b98def5a479d1da966f2e959408
treeb8171b21b360c421582cdb25dde28641f746730b
parent4874e4f9566b5e536e6c66b559574d2df97e20ec
Fix and refactor TheoryStrings::checkFlatForms() (#3326)

This commit fixes some minor (performance) issues in
`TheoryStrings::checkFlatForms()`: The `inelig` vector was initialized
with copies of the `start` element instead of all the elements before
`start` and the `else` branch of `count == asize` was looping over all
elements from `1` instead of `start + 1`. Additionally, this commit
refactors the code to be a bit more readable.
src/theory/strings/theory_strings.cpp
src/theory/strings/theory_strings.h