ソースを参照

Fix to compile with mingw-w64

There is a macro called `RGB` somewhere in mingw-w64(gcc7.2.0)
The macro conflicts with the variable `RGB` in writeOFF.cpp
Simple renaming solves the problem.


Former-commit-id: d1cc25b7e1e09b22782581e5694f4f63f37bc4b4
Wesley Ranger 7 年 前
コミット
1e8e992a63
1 ファイル変更2 行追加2 行削除
  1. 2 2
      include/igl/writeOFF.cpp

+ 2 - 2
include/igl/writeOFF.cpp

@@ -61,13 +61,13 @@ IGL_INLINE bool igl::writeOFF(
 
   //Check if RGB values are in the range [0..1] or [0..255]
   int rgbScale = (C.maxCoeff() <= 1.0)?255:1;
-  Eigen::MatrixXd RGB = rgbScale * C;
+  Eigen::MatrixXd RGB_Array = rgbScale * C;
 
   s<< "COFF\n"<<V.rows()<<" "<<F.rows()<<" 0\n";
   for (unsigned i=0; i< V.rows(); i++)
   {
     s <<V.row(i).format(IOFormat(FullPrecision,DontAlignCols," "," ","","",""," "));
-    s << unsigned(RGB(i,0)) << " " << unsigned(RGB(i,1)) << " " << unsigned(RGB(i,2)) << " 255\n";
+    s << unsigned(RGB_Array(i,0)) << " " << unsigned(RGB_Array(i,1)) << " " << unsigned(RGB_Array(i,2)) << " 255\n";
   }
 
   s<<(F.array()).format(IOFormat(FullPrecision,DontAlignCols," ","\n","3 ","","","\n"));