Remove undefined behavior

* Taking the negative of a signed negative is UB, but
  taking the negative of an unsigned is not.
This commit is contained in:
Howard Hinnant
2022-09-15 11:31:15 -04:00
committed by Elliot Lee
parent d275a2ab72
commit 6fcd654bee
6 changed files with 255 additions and 183 deletions

View File

@@ -466,6 +466,14 @@ Env::enableFeature(uint256 const feature)
app().config().features.insert(feature);
}
void
Env::disableFeature(uint256 const feature)
{
// Env::close() must be called for feature
// enable to take place.
app().config().features.erase(feature);
}
} // namespace jtx
} // namespace test