瀏覽代碼

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

Valerio Magnago 7 年之前
父節點
當前提交
ce69854b03
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);