Browse Source

warnings

Former-commit-id: 7124d014c329f3c991f254a120e388901ad9de53
Alec Jacobson 10 years ago
parent
commit
cf9fa79b00

+ 9 - 6
include/igl/angles.h

@@ -8,13 +8,14 @@
 #ifndef IGL_ANGLES_H
 #define IGL_ANGLES_H
 #ifdef _WIN32
- #pragma message ( "Deprecated. Use igl/internal_angles.h instead" )
+#  pragma message ( "Deprecated. Use igl/internal_angles.h instead" )
 #else
- #warning "Deprecated. Use igl/internal_angles.h instead"
+#  warning "Deprecated. Use igl/internal_angles.h instead"
 #endif
 
 
 #include "igl_inline.h"
+#include "deprecated.h"
 #include <Eigen/Core>
 namespace igl
 {
@@ -30,10 +31,12 @@ namespace igl
   typename DerivedV,
   typename DerivedF,
   typename Derivedtheta>
-  IGL_INLINE void angles(
-  const Eigen::PlainObjectBase<DerivedV>& V,
-  const Eigen::PlainObjectBase<DerivedF>& F,
-  Eigen::PlainObjectBase<Derivedtheta>& theta);
+  IGL_INLINE 
+  IGL_DEPRECATED(
+    void angles(
+    const Eigen::PlainObjectBase<DerivedV>& V,
+    const Eigen::PlainObjectBase<DerivedF>& F,
+    Eigen::PlainObjectBase<Derivedtheta>& theta));
 
 }
 

+ 2 - 0
include/igl/compile_shader.h

@@ -18,6 +18,8 @@ namespace igl
   //     glAttachShader(prog_id,vid);
   //     glAttachShader(prog_id,fid);
   //     glLinkProgram(prog_id);
+  //
+  // Known bugs: seems to be duplicate of `load_shader`
   IGL_INLINE GLuint compile_shader(const GLint type, const char * str);
 }
 #ifndef IGL_STATIC_LIBRARY

+ 2 - 1
include/igl/hsv_to_rgb.cpp

@@ -55,7 +55,7 @@ void igl::hsv_to_rgb(
     hsv[0] = H(r,0);
     hsv[1] = H(r,1);
     hsv[2] = H(r,2);
-    typename DerivedR::Scalar rgb[3];
+    typename DerivedR::Scalar rgb[] = {0,0,0};
     hsv_to_rgb(hsv,rgb);
     R(r,0) = rgb[0];
     R(r,1) = rgb[1];
@@ -65,4 +65,5 @@ void igl::hsv_to_rgb(
 
 #ifdef IGL_STATIC_LIBRARY
 template void igl::hsv_to_rgb<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::hsv_to_rgb<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >&);
 #endif

+ 1 - 0
include/igl/jet.cpp

@@ -134,4 +134,5 @@ template void igl::jet<float>(float, float*);
 template void igl::jet<Eigen::Array<double, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Array<double, -1, 1, 0, -1, 1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::jet<Eigen::Matrix<int, -1, 1, 0, -1, 1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<int, -1, 1, 0, -1, 1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template void igl::jet<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, bool, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::jet<float>(float, float&, float&, float&);
 #endif

+ 5 - 0
include/igl/readOBJ.cpp

@@ -309,6 +309,11 @@ IGL_INLINE bool igl::readOBJPoly(
   Eigen::PlainObjectBase<DerivedT>& TC,
   Eigen::PlainObjectBase<DerivedF>& FTC)
 {
+#ifdef _WIN32
+ #pragma message ( "Deprecated. Use `readOBJ` with vector args instead" )
+#else
+ #warning "Deprecated. Use `readOBJ` with vector args instead"
+#endif
   std::vector<std::vector<double> > vV,vTC,vN;
   std::vector<std::vector<Index> > vF,vFTC,vFN;
   bool success = igl::readOBJ(str,vV,vTC,vN,vF,vFTC,vFN);

+ 5 - 2
include/igl/readOBJ.h

@@ -8,6 +8,7 @@
 #ifndef IGL_READOBJ_H
 #define IGL_READOBJ_H
 #include "igl_inline.h"
+#include "deprecated.h"
 // History:
 //  return type changed from void to bool  Alec 18 Sept 2011
 //  added pure vector of vectors version that has much more support Alec 31 Oct
@@ -98,14 +99,16 @@ namespace igl
     typename DerivedF, 
     typename DerivedT, 
     typename Index>
-  IGL_INLINE bool readOBJPoly(
+  IGL_INLINE 
+  IGL_DEPRECATED(
+  bool readOBJPoly(
     const std::string str,
     Eigen::PlainObjectBase<DerivedV>& V,
     std::vector<std::vector<Index> >& F,
     Eigen::PlainObjectBase<DerivedV>& CN,
     Eigen::PlainObjectBase<DerivedF>& FN,
     Eigen::PlainObjectBase<DerivedT>& TC,
-    Eigen::PlainObjectBase<DerivedF>& FTC);
+    Eigen::PlainObjectBase<DerivedF>& FTC));
   
   //! Read a mesh from an ascii obj file
   // Inputs:

+ 2 - 1
include/igl/rgb_to_hsv.cpp

@@ -84,7 +84,7 @@ IGL_INLINE void igl::rgb_to_hsv(
     rgb[0] = R(r,0);
     rgb[1] = R(r,1);
     rgb[2] = R(r,2);
-    typename DerivedH::Scalar hsv[3];
+    typename DerivedH::Scalar hsv[] = {0,0,0};
     rgb_to_hsv(rgb,hsv);
     H(r,0) = hsv[0];
     H(r,1) = hsv[1];
@@ -97,4 +97,5 @@ IGL_INLINE void igl::rgb_to_hsv(
 template void igl::rgb_to_hsv<float, double>(float const*, double*);
 template void igl::rgb_to_hsv<double, double>(double const*, double*);
 template void igl::rgb_to_hsv<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
+template void igl::rgb_to_hsv<Eigen::Matrix<float, -1, -1, 0, -1, -1>, Eigen::Matrix<float, -1, -1, 0, -1, -1> >(Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> > const&, Eigen::PlainObjectBase<Eigen::Matrix<float, -1, -1, 0, -1, -1> >&);
 #endif