summaryrefslogtreecommitdiff
path: root/src/smt/managed_ostreams.cpp
diff options
context:
space:
mode:
authorGereon Kremer <gkremer@stanford.edu>2021-04-26 21:43:15 +0200
committerGitHub <noreply@github.com>2021-04-26 19:43:15 +0000
commitc32f952b1e496a5bd05552f676d51b5af3e49ed0 (patch)
tree50ad233923f494b5f551d3ba0b6a4705ed5b24db /src/smt/managed_ostreams.cpp
parent2bf51317486cfbfc8c19e32256ca9727bfb2e42a (diff)
First part of options refactoring (#6428)
This PR does a first round of refactoring and gets rid of a significant portion of generated code. In particular - it removes options::optionName.wasSetByUser() (we still have Options::wasSetByUser()) - it removes options::optionName.set() (we still have Options::set()) - it removes options::optionName.getName() in favor of options::optionName.name - it removes the specializations of Options::assign() and Options::assignBool() from the headers - it eliminates runHandlerAndPredicates() and runBoolPredicates() The removed methods are only used in few places with are changed to using Options::current().X() instead. In the future, we also want to get rid of options::optionName() and use Options::operator[]() instead, and furthermore not use Options::current() but use the options from the Env object. This PR already adds Env::getOption() as a shorthand for Env::getOptions()[...] and uses it as a proof of concept within SmtEngine.
Diffstat (limited to 'src/smt/managed_ostreams.cpp')
-rw-r--r--src/smt/managed_ostreams.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smt/managed_ostreams.cpp b/src/smt/managed_ostreams.cpp
index 31bcc5f2f..b2f02b34d 100644
--- a/src/smt/managed_ostreams.cpp
+++ b/src/smt/managed_ostreams.cpp
@@ -90,7 +90,7 @@ ManagedRegularOutputChannel::~ManagedRegularOutputChannel() {
// to null_os. Consult RegularOutputChannelListener for the list of
// channels.
if(options::err() == getManagedOstream()){
- options::err.set(&null_os);
+ Options::current().set(options::err, &null_os);
}
}
@@ -114,7 +114,7 @@ ManagedDiagnosticOutputChannel::~ManagedDiagnosticOutputChannel() {
// to null_os. Consult DiagnosticOutputChannelListener for the list of
// channels.
if(options::err() == getManagedOstream()){
- options::err.set(&null_os);
+ Options::current().set(options::err, &null_os);
}
if(Debug.getStreamPointer() == getManagedOstream()) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback