summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-11-16 01:04:43 +0000
committerjoerg <joerg@pkgsrc.org>2012-11-16 01:04:43 +0000
commit430d634b9e77ffd7051faedefeb3db312ef351a5 (patch)
tree57b1da56b0ae5e6ae545d059478dfaf232add52f
parent318767726e15a81633e3768a88fa750d616db1a8 (diff)
downloadpkgsrc-430d634b9e77ffd7051faedefeb3db312ef351a5.tar.gz
Don't redeclare a local variable.
-rw-r--r--math/muparser/distinfo3
-rw-r--r--math/muparser/patches/patch-src_muParserTest.cpp37
2 files changed, 39 insertions, 1 deletions
diff --git a/math/muparser/distinfo b/math/muparser/distinfo
index 70b794dd570..f5b486c3c3a 100644
--- a/math/muparser/distinfo
+++ b/math/muparser/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.5 2012/08/15 17:38:49 drochner Exp $
+$NetBSD: distinfo,v 1.6 2012/11/16 01:04:43 joerg Exp $
SHA1 (muparser_v2_2_2.zip) = 830383b1bcfa706be5a6ac8b7ba43f32f16a1497
RMD160 (muparser_v2_2_2.zip) = efcaea175523b2e7b3e0d2abaf1ee8767d142da3
Size (muparser_v2_2_2.zip) = 1508675 bytes
SHA1 (patch-aa) = ce9187280bdaf5c00765723b01412b232fcbe4d7
+SHA1 (patch-src_muParserTest.cpp) = da3e3b3916cdc158513ef40dda8c10ddf8c87840
diff --git a/math/muparser/patches/patch-src_muParserTest.cpp b/math/muparser/patches/patch-src_muParserTest.cpp
new file mode 100644
index 00000000000..e2a04f0a316
--- /dev/null
+++ b/math/muparser/patches/patch-src_muParserTest.cpp
@@ -0,0 +1,37 @@
+$NetBSD: patch-src_muParserTest.cpp,v 1.1 2012/11/16 01:04:43 joerg Exp $
+
+--- src/muParserTest.cpp.orig 2012-11-14 13:35:12.000000000 +0000
++++ src/muParserTest.cpp
+@@ -1292,25 +1292,25 @@ namespace mu
+ // Test copy constructor
+ std::vector<mu::Parser> vParser;
+ vParser.push_back(*(p1.get()));
+- mu::Parser p2 = vParser[0]; // take parser from vector
++ mu::Parser p2a = vParser[0]; // take parser from vector
+
+ // destroy the originals from p2
+ vParser.clear(); // delete the vector
+ p1.reset(0);
+
+- fVal[2] = p2.Eval();
++ fVal[2] = p2a.Eval();
+
+ // Test assignement operator
+ // additionally disable Optimizer this time
+- mu::Parser p3;
+- p3 = p2;
+- p3.EnableOptimizer(false);
+- fVal[3] = p3.Eval();
++ mu::Parser p3a;
++ p3a = p2a;
++ p3a.EnableOptimizer(false);
++ fVal[3] = p3a.Eval();
+
+ // Test Eval function for multiple return values
+ // use p2 since it has the optimizer enabled!
+ int nNum;
+- value_type *v = p2.Eval(nNum);
++ value_type *v = p2a.Eval(nNum);
+ fVal[4] = v[nNum-1];
+ }
+ catch(std::exception &e)