Skip to content

Commit cc4dbed

Browse files
committed
Added missing inlines
1 parent 42160dd commit cc4dbed

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

matplotlibcpp.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ namespace matplotlibcpp {
129129
};
130130
}
131131

132-
bool annotate(std::string annotation, double x, double y) {
132+
inline bool annotate(std::string annotation, double x, double y) {
133133
PyObject *xy = PyTuple_New(2);
134134
PyObject *str = PyString_FromString(annotation.c_str());
135135

@@ -420,7 +420,7 @@ namespace matplotlibcpp {
420420
}
421421

422422

423-
double *xlim() {
423+
inline double *xlim() {
424424
PyObject *args = PyTuple_New(0);
425425
PyObject *res = PyObject_CallObject(detail::_interpreter::get().s_python_function_xlim, args);
426426
PyObject *left = PyTuple_GetItem(res, 0);
@@ -435,7 +435,7 @@ namespace matplotlibcpp {
435435
}
436436

437437

438-
double *ylim() {
438+
inline double *ylim() {
439439
PyObject *args = PyTuple_New(0);
440440
PyObject *res = PyObject_CallObject(detail::_interpreter::get().s_python_function_ylim, args);
441441
PyObject *left = PyTuple_GetItem(res, 0);
@@ -654,31 +654,31 @@ namespace matplotlibcpp {
654654

655655
// recursion stop for the above
656656
template<typename... Args>
657-
bool plot() { return true; }
657+
inline bool plot() { return true; }
658658

659659
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) {
661661
return detail::plot_impl<typename detail::is_callable<B>::type>()(a, b, format) && plot(args...);
662662
}
663663

664664
/*
665665
* This group of plot() functions is needed to support initializer lists, i.e. calling
666666
* plot( {1,2,3,4} )
667667
*/
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 = "") {
669669
return plot<double, double>(x, y, format);
670670
}
671671

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 = "") {
673673
return plot<double>(y, format);
674674
}
675675

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,
677677
const std::map<std::string, std::string> &keywords) {
678678
return plot<double>(x, y, keywords);
679679
}
680680

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,
682682
const std::string &format = "") {
683683
return named_plot<double>(name, x, y, format);
684684
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy