浏览代码

note about dubious reference usage

Former-commit-id: dcb882b97bf9346c8dee81e6451aef4f509bb8e5
Alec Jacobson 7 年之前
父节点
当前提交
1ba38d8371
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      include/igl/integrable_polyvector_fields.cpp

+ 3 - 0
include/igl/integrable_polyvector_fields.cpp

@@ -47,6 +47,9 @@ namespace igl {
                                     const double &s,
                                     Eigen::VectorXd &residuals,
                                     bool do_jac = false,
+                                    // Alec: why use a reference if it can
+                                    // point some undefined junk? This is asking
+                                    // for trouble...
                                     Eigen::MatrixXd &J = *(Eigen::MatrixXd*)NULL);
     IGL_INLINE void rj_polycurl_edge(const Eigen::RowVectorXd &vec2D_a,
                                      const Eigen::RowVector2d &ea,