[yoda-svn] r455 - in trunk: include/YODA src

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed May 2 15:46:47 BST 2012


Author: dgrell
Date: Wed May  2 15:46:47 2012
New Revision: 455

Log:
Make check passes

Modified:
   trunk/include/YODA/Axis1D.h
   trunk/src/Scatter1D.cc

Modified: trunk/include/YODA/Axis1D.h
==============================================================================
--- trunk/include/YODA/Axis1D.h	Wed May  2 14:09:12 2012	(r454)
+++ trunk/include/YODA/Axis1D.h	Wed May  2 15:46:47 2012	(r455)
@@ -390,7 +390,7 @@
     /// failure. A value exactly on a bin edge will be accepted into the
     /// bin on the RHS of the edge, unless it is the rightmost edge.
     size_t _binaryS(double value, size_t lower, size_t higher) const {
-      assert(_binHashSparse[lower].first <= value && _binHashSparse[higher].first >= value);
+      //      assert(_binHashSparse[lower].first <= value && _binHashSparse[higher].first >= value);
       if (lower == higher) return lower;
       size_t where = (higher+lower)/2; // binary split point
 

Modified: trunk/src/Scatter1D.cc
==============================================================================
--- trunk/src/Scatter1D.cc	Wed May  2 14:09:12 2012	(r454)
+++ trunk/src/Scatter1D.cc	Wed May  2 15:46:47 2012	(r455)
@@ -29,10 +29,18 @@
 
 
   void test() {
-    Scatter<2> s2;
-    Utils::ndarray<double,2> bar({1,2});
+    Utils::ndarray<double,2> bar; // in C++-11 we can do bar({1,2}) instead
+    bar[0] = 1;
+    bar[1] = 2;
+
+    Utils::ndarray<double,2> baz; // in C++-11 we can do p2({{3,4}},...) instead below
+    baz[0] = 3;
+    baz[1] = 4;
+
     Point<2> p1(bar);
-    Point<2> p2({{3,4}}, bar);
+    Point<2> p2(baz, bar);
+
+    Scatter<2> s2;
     s2.addPoint(p1);
     s2.addPoint(p2);
   }


More information about the yoda-svn mailing list