Jelajahi Sumber

added a char* cast at line 95 and solve compilation error

Valerio Magnago 7 tahun lalu
induk
melakukan
ce69854b03
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      matplotlibcpp.h

+ 1 - 1
matplotlibcpp.h

@@ -92,7 +92,7 @@ namespace matplotlibcpp {
 				// matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
 				// or matplotlib.backends is imported for the first time
 				if (!s_backend.empty()) {
-					PyObject_CallMethod(matplotlib, "use", "s", s_backend.c_str());
+					PyObject_CallMethod(matplotlib, const_cast<char*>("use"), const_cast<char*>("s"), s_backend.c_str());
 				}
 
 				PyObject* pymod = PyImport_Import(pyplotname);