From: Brian Norris Date: Thu, 13 Dec 2012 08:12:28 +0000 (-0800) Subject: model: make dumpGraph 'const' X-Git-Tag: oopsla2013~422 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5e4e1eebcf9a6248ba9227d7f486ad1fe2a2d3d1;p=model-checker.git model: make dumpGraph 'const' SUPPORT_MOD_ORDER_DUMP can't compile if dumpGraph() isn't const. --- diff --git a/model.cc b/model.cc index 717f4a8..21cfb2d 100644 --- a/model.cc +++ b/model.cc @@ -2563,7 +2563,8 @@ static void print_list(action_list_t *list, int exec_num = -1) } #if SUPPORT_MOD_ORDER_DUMP -void ModelChecker::dumpGraph(char *filename) { +void ModelChecker::dumpGraph(char *filename) const +{ char buffer[200]; sprintf(buffer, "%s.dot",filename); FILE *file = fopen(buffer, "w"); diff --git a/model.h b/model.h index 76b2aff..8345678 100644 --- a/model.h +++ b/model.h @@ -101,7 +101,7 @@ public: void print_summary() const; #if SUPPORT_MOD_ORDER_DUMP - void dumpGraph(char *filename); + void dumpGraph(char *filename) const; #endif void add_thread(Thread *t);