@@ -129,7 +129,7 @@ namespace matplotlibcpp {
129
129
};
130
130
}
131
131
132
- bool annotate (std::string annotation, double x, double y) {
132
+ inline bool annotate (std::string annotation, double x, double y) {
133
133
PyObject *xy = PyTuple_New (2 );
134
134
PyObject *str = PyString_FromString (annotation.c_str ());
135
135
@@ -420,7 +420,7 @@ namespace matplotlibcpp {
420
420
}
421
421
422
422
423
- double *xlim () {
423
+ inline double *xlim () {
424
424
PyObject *args = PyTuple_New (0 );
425
425
PyObject *res = PyObject_CallObject (detail::_interpreter::get ().s_python_function_xlim , args);
426
426
PyObject *left = PyTuple_GetItem (res, 0 );
@@ -435,7 +435,7 @@ namespace matplotlibcpp {
435
435
}
436
436
437
437
438
- double *ylim () {
438
+ inline double *ylim () {
439
439
PyObject *args = PyTuple_New (0 );
440
440
PyObject *res = PyObject_CallObject (detail::_interpreter::get ().s_python_function_ylim , args);
441
441
PyObject *left = PyTuple_GetItem (res, 0 );
@@ -654,31 +654,31 @@ namespace matplotlibcpp {
654
654
655
655
// recursion stop for the above
656
656
template <typename ... Args>
657
- bool plot () { return true ; }
657
+ inline bool plot () { return true ; }
658
658
659
659
template <typename A, typename B, typename ... Args>
660
- bool plot (const A &a, const B &b, const std::string &format, Args... args) {
660
+ inline bool plot (const A &a, const B &b, const std::string &format, Args... args) {
661
661
return detail::plot_impl<typename detail::is_callable<B>::type>()(a, b, format) && plot (args...);
662
662
}
663
663
664
664
/*
665
665
* This group of plot() functions is needed to support initializer lists, i.e. calling
666
666
* plot( {1,2,3,4} )
667
667
*/
668
- bool plot (const std::vector<double > &x, const std::vector<double > &y, const std::string &format = " " ) {
668
+ inline bool plot (const std::vector<double > &x, const std::vector<double > &y, const std::string &format = " " ) {
669
669
return plot<double , double >(x, y, format);
670
670
}
671
671
672
- bool plot (const std::vector<double > &y, const std::string &format = " " ) {
672
+ inline bool plot (const std::vector<double > &y, const std::string &format = " " ) {
673
673
return plot<double >(y, format);
674
674
}
675
675
676
- bool plot (const std::vector<double > &x, const std::vector<double > &y,
676
+ inline bool plot (const std::vector<double > &x, const std::vector<double > &y,
677
677
const std::map<std::string, std::string> &keywords) {
678
678
return plot<double >(x, y, keywords);
679
679
}
680
680
681
- bool named_plot (const std::string &name, const std::vector<double > &x, const std::vector<double > &y,
681
+ inline bool named_plot (const std::string &name, const std::vector<double > &x, const std::vector<double > &y,
682
682
const std::string &format = " " ) {
683
683
return named_plot<double >(name, x, y, format);
684
684
}
0 commit comments