From 5bca1e6c4daba31d5c216a86ce3997f0a46a3cd5 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Tue, 15 Mar 2022 19:22:21 -0700 Subject: [PATCH] api: Make mkDatatypeDecl argument const&. (#8315) --- src/api/cpp/cvc5.cpp | 2 +- src/api/cpp/cvc5.h | 2 +- src/api/python/cvc5.pxd | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/cpp/cvc5.cpp b/src/api/cpp/cvc5.cpp index 4f3a768a1..dda7aacc7 100644 --- a/src/api/cpp/cvc5.cpp +++ b/src/api/cpp/cvc5.cpp @@ -6182,7 +6182,7 @@ DatatypeDecl Solver::mkDatatypeDecl(const std::string& name, bool isCoDatatype) } DatatypeDecl Solver::mkDatatypeDecl(const std::string& name, - Sort param, + const Sort& param, bool isCoDatatype) { CVC5_API_TRY_CATCH_BEGIN; diff --git a/src/api/cpp/cvc5.h b/src/api/cpp/cvc5.h index 1138eafc8..eedc10b80 100644 --- a/src/api/cpp/cvc5.h +++ b/src/api/cpp/cvc5.h @@ -3718,7 +3718,7 @@ class CVC5_EXPORT Solver * @return the DatatypeDecl */ DatatypeDecl mkDatatypeDecl(const std::string& name, - Sort param, + const Sort& param, bool isCoDatatype = false); /** diff --git a/src/api/python/cvc5.pxd b/src/api/python/cvc5.pxd index 9350ca0bf..07250f143 100644 --- a/src/api/python/cvc5.pxd +++ b/src/api/python/cvc5.pxd @@ -247,8 +247,8 @@ cdef extern from "api/cpp/cvc5.h" namespace "cvc5::api": DatatypeConstructorDecl mkDatatypeConstructorDecl(const string& name) except + DatatypeDecl mkDatatypeDecl(const string& name) except + DatatypeDecl mkDatatypeDecl(const string& name, bint isCoDatatype) except + - DatatypeDecl mkDatatypeDecl(const string& name, Sort param) except + - DatatypeDecl mkDatatypeDecl(const string& name, Sort param, bint isCoDatatype) except + + DatatypeDecl mkDatatypeDecl(const string& name, const Sort& param) except + + DatatypeDecl mkDatatypeDecl(const string& name, const Sort& param, bint isCoDatatype) except + DatatypeDecl mkDatatypeDecl(const string& name, vector[Sort]& params) except + DatatypeDecl mkDatatypeDecl(const string& name, vector[Sort]& params, bint isCoDatatype) except + # default value for symbol defined in cpp/cvc5.h -- 2.30.2