Skip to content

Commit

Permalink
Avoid unused variable warning in bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
BUYT-1 committed Dec 11, 2023
1 parent 0ed6cde commit 09899c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/python_bindings/bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@

INITIALIZE_EASYLOGGINGPP

#define DEFINE_ALGORITHM(type, base) \
auto var##type = py::class_<Py##type, Py##base##Base>(module, #type).def(py::init<>()); \
var##type.doc() = MakeDocString<Py##type>(); \
var##type
#define DEFINE_ALGORITHM(type, base) \
auto var##type = py::class_<Py##type, Py##base##Base>(module, #type); \
var##type.doc() = MakeDocString<Py##type>(); \
var##type.def(py::init<>())
#define DEFINE_ALGORITHM_BASE(base) py::class_<Py##base##Base, PyAlgorithmBase>(module, #base)
#define DEFINE_FD_ALGORITHM(type) DEFINE_ALGORITHM(type, FdAlgorithm)
#define DEFINE_AR_ALGORITHM(type) DEFINE_ALGORITHM(type, ArAlgorithm)
Expand All @@ -61,7 +61,7 @@ INITIALIZE_EASYLOGGINGPP
namespace {
template <typename AlgoType>
std::string MakeDocString() {
AlgoType algo = AlgoType();
auto algo = AlgoType();
std::stringstream docstring;
docstring << "Options:\n";
for (std::string_view option_name : algo.GetPossibleOptions()) {
Expand Down

0 comments on commit 09899c4

Please sign in to comment.