ソースを参照

Merge pull request #679 from metorm/build-with-mingw

Rename a variable to compile with mingw-w64

Former-commit-id: 4f043641cc4598162f11aa33c9df364a90d38d42
Alec Jacobson 7 年 前
コミット
7f883672fa
1 ファイル変更4 行追加2 行削除
  1. 4 2
      include/igl/writeOFF.cpp

+ 4 - 2
include/igl/writeOFF.cpp

@@ -61,13 +61,15 @@ 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;
+  // Use RGB_Array instead of RGB because of clash with mingw macro 
+  // (https://github.com/libigl/libigl/pull/679)
+  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"));