Browse Source

fix for windows

Former-commit-id: c42e18a8e1273d4f3acf49647ad9413c41ee482b
Alec Jacobson 10 years ago
parent
commit
3005b455e7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/igl/C_STR.h
  2. 1 1
      include/igl/STR.h

+ 1 - 1
include/igl/C_STR.h

@@ -14,5 +14,5 @@
 //   func(C_STR("foo"<<1<<"bar"));
 #include <sstream>
 #include <string>
-#define C_STR(X) static_cast<std::ostringstream&>(std::ostringstream().seekp(0) << X).str().c_str()
+#define C_STR(X) static_cast<std::ostringstream&>(std::ostringstream().flush() << X).str().c_str()
 #endif

+ 1 - 1
include/igl/STR.h

@@ -14,5 +14,5 @@
 //   void func(std::string c);
 // Then you can write:
 //   func(STR("foo"<<1<<"bar"));
-#define STR(X) static_cast<std::ostringstream&>(std::ostringstream().seekp(0) << X).str()
+#define STR(X) static_cast<std::ostringstream&>(std::ostringstream().flush() << X).str()
 #endif