Преглед на файлове

better assertion

Former-commit-id: d03ac44c4dd7da355fc4021b86ad5d1a70690c3b
Alec Jacobson преди 9 години
родител
ревизия
b27fa2707b
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      include/igl/boundary_conditions.cpp

+ 4 - 1
include/igl/boundary_conditions.cpp

@@ -162,8 +162,11 @@ IGL_INLINE bool igl::boundary_conditions(
 
   // If there's only a single boundary condition, the following tests
   // are overzealous.
-  if(bc.rows() == 1)
+  if(bc.cols() == 1)
   {
+    // If there is only one weight function,
+    // then we expect that there is only one handle.
+    assert(P.rows() + BE.rows() == 1);
     return true;
   }