summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-04-21 14:31:26 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-04-21 14:31:26 +0200
commit3903044dd68da8ac6d589cfc873260dccbf4cd8f (patch)
tree91be92efa057b7138c8d2c4c9e2ea05c2e44a2c2
parenta5b6a77772a705cccfd25a108a966cc5070d63a3 (diff)
use awk instead of macro hack
-rw-r--r--test/graph/2sat.cpp3
-rw-r--r--test/graph/2sat.cpp.awk6
2 files changed, 6 insertions, 3 deletions
diff --git a/test/graph/2sat.cpp b/test/graph/2sat.cpp
index fc3186e..cf37131 100644
--- a/test/graph/2sat.cpp
+++ b/test/graph/2sat.cpp
@@ -1,9 +1,6 @@
#include "../util.h"
#include <graph/scc.cpp>
-#define static vector<vector<int>> adj; static // hacky...
#include <graph/2sat.cpp>
-#undef static
-#undef adj
struct RandomClause {
int a, b;
diff --git a/test/graph/2sat.cpp.awk b/test/graph/2sat.cpp.awk
new file mode 100644
index 0000000..d0215d8
--- /dev/null
+++ b/test/graph/2sat.cpp.awk
@@ -0,0 +1,6 @@
+/scc variablen/ {
+ print;
+ print "\tvector<vector<int>> adj;";
+ next
+}
+{ print }