summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2021-03-10 15:58:11 -0800
committerGitHub <noreply@github.com>2021-03-10 23:58:11 +0000
commit982d1bea6ec9ac9b8932f99762ab2b3908958f32 (patch)
tree4f5ba9a5559d9b273a514f60eb9b354555e74b95 /src/main
parent489209a31c2a2bf2f5ce465c1a79f73aad90c764 (diff)
Use Assert instead of assert. (#6095)
This commit replaces all uses of assert with Assert from base/check.h to ensure that all assertions get checked in production builds with enabled assertions.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/command_executor.cpp1
-rw-r--r--src/main/interactive_shell.cpp8
2 files changed, 4 insertions, 5 deletions
diff --git a/src/main/command_executor.cpp b/src/main/command_executor.cpp
index 0ac3ad6bd..e80ed7749 100644
--- a/src/main/command_executor.cpp
+++ b/src/main/command_executor.cpp
@@ -18,7 +18,6 @@
# include <sys/resource.h>
#endif /* ! __WIN32__ */
-#include <cassert>
#include <iostream>
#include <memory>
#include <string>
diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp
index ecd754bb4..4fe8d4da9 100644
--- a/src/main/interactive_shell.cpp
+++ b/src/main/interactive_shell.cpp
@@ -17,7 +17,6 @@
#include "main/interactive_shell.h"
#include <algorithm>
-#include <cassert>
#include <cstdlib>
#include <iostream>
#include <set>
@@ -37,6 +36,7 @@
#endif /* HAVE_LIBEDITLINE */
#include "api/cvc4cpp.h"
+#include "base/check.h"
#include "base/output.h"
#include "expr/symbol_manager.h"
#include "options/language.h"
@@ -222,12 +222,12 @@ restart:
Debug("interactive") << "Input now '" << input << line << "'" << endl
<< flush;
- assert( !(d_in.fail() && !d_in.eof()) || line.empty() );
+ Assert(!(d_in.fail() && !d_in.eof()) || line.empty());
/* Check for failure. */
if(d_in.fail() && !d_in.eof()) {
/* This should only happen if the input line was empty. */
- assert( line.empty() );
+ Assert(line.empty());
d_in.clear();
}
@@ -262,7 +262,7 @@ restart:
{
/* Extract the newline delimiter from the stream too */
int c CVC4_UNUSED = d_in.get();
- assert(c == '\n');
+ Assert(c == '\n');
Debug("interactive") << "Next char is '" << (char)c << "'" << endl
<< flush;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback