Cleanup some implementations

This commit is contained in:
topjohnwu
2020-05-24 04:16:40 -07:00
parent 51eeb89f67
commit 951273f8ef
6 changed files with 263 additions and 288 deletions

View File

@@ -133,7 +133,7 @@ static bool tokenize_and_check(char *stmt, vector<vector<char *>> &arr) {
template <typename Func, typename ...Args>
static void run_and_check(const Func &fn, const char *action, Args ...args) {
if (fn(args...)) {
if (!fn(args...)) {
string s = "Error in: %s";
for (int i = 0; i < sizeof...(args); ++i) s += " %s";
s += "\n";