From 10106e8e125e011f408b91f7b45997057a5ab144 Mon Sep 17 00:00:00 2001 From: Arie Gurfinkel Date: Tue, 15 May 2018 09:43:01 -0700 Subject: [PATCH] Minor fixes to ast_pp_dot --- src/ast/ast_pp_dot.cpp | 3 ++- src/ast/ast_pp_dot.h | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ast/ast_pp_dot.cpp b/src/ast/ast_pp_dot.cpp index 1dfbe9aae..47da4d4f4 100644 --- a/src/ast/ast_pp_dot.cpp +++ b/src/ast/ast_pp_dot.cpp @@ -9,7 +9,8 @@ Abstract: Pretty-printer for proofs in Graphviz format #include "ast/ast_pp_dot.h" // string escaping for DOT -std::string escape_dot(std::string const & s) { +std::string escape_dot(const std::string &s) +{ std::string res; res.reserve(s.size()); // preallocate for (auto c : s) { diff --git a/src/ast/ast_pp_dot.h b/src/ast/ast_pp_dot.h index 537754e83..d233c4be1 100644 --- a/src/ast/ast_pp_dot.h +++ b/src/ast/ast_pp_dot.h @@ -4,10 +4,11 @@ Abstract: Pretty-printer for proofs in Graphviz format --*/ -#pragma once +#ifndef _AST_PP_DOT_ +#define _AST_PP_DOT_ #include -#include "ast_pp.h" +#include "ast/ast_pp.h" class ast_pp_dot { ast_manager & m_manager; @@ -21,4 +22,8 @@ class ast_pp_dot { ast_manager & get_manager() const { return m_manager; } }; -std::ostream &operator<<(std::ostream &out, const ast_pp_dot & p); \ No newline at end of file +std::string escape_dot(std::string const & s); + +std::ostream &operator<<(std::ostream &out, const ast_pp_dot & p); + +#endif /* AST_PP_DOT */