summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2020-03-18 19:29:18 +0000
committerjoerg <joerg@pkgsrc.org>2020-03-18 19:29:18 +0000
commit2c8bd71111046ebf487e0bcf43e1c38e7147cc10 (patch)
tree31eff0b2fb1a295729ac9e56b08c54e5f3ab4aa2 /math
parentdbf542ccedfa7a8c745edd95723a8ff98532aef6 (diff)
downloadpkgsrc-2c8bd71111046ebf487e0bcf43e1c38e7147cc10.tar.gz
Fix vector to element array conversion
Diffstat (limited to 'math')
-rw-r--r--math/py-z3solver/patches/patch-core_src_util_lp_permutation__matrix.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/math/py-z3solver/patches/patch-core_src_util_lp_permutation__matrix.h b/math/py-z3solver/patches/patch-core_src_util_lp_permutation__matrix.h
new file mode 100644
index 00000000000..2c1c7829120
--- /dev/null
+++ b/math/py-z3solver/patches/patch-core_src_util_lp_permutation__matrix.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-core_src_util_lp_permutation__matrix.h,v 1.1 2020/03/18 19:29:18 joerg Exp $
+
+Fixes no conversion from const vector<unsigned> to unsigned int *.
+
+--- core/src/util/lp/permutation_matrix.h.orig 2020-03-18 15:38:20.643552591 +0000
++++ core/src/util/lp/permutation_matrix.h
+@@ -117,7 +117,7 @@ class permutation_matrix : public tail_m
+
+ unsigned size() const { return static_cast<unsigned>(m_rev.size()); }
+
+- unsigned * values() const { return m_permutation; }
++ unsigned * values() { return &m_permutation[0]; }
+
+ void resize(unsigned size) {
+ unsigned old_size = m_permutation.size();