From 09899c4eabefb58cad999a356d7f938f31d7ce63 Mon Sep 17 00:00:00 2001 From: Alexey Shlyonskikh Date: Mon, 11 Dec 2023 13:21:33 +0300 Subject: [PATCH] Avoid unused variable warning in bindings --- src/python_bindings/bindings.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/python_bindings/bindings.cpp b/src/python_bindings/bindings.cpp index 3e55c576cc..b61358c6fe 100644 --- a/src/python_bindings/bindings.cpp +++ b/src/python_bindings/bindings.cpp @@ -49,10 +49,10 @@ INITIALIZE_EASYLOGGINGPP -#define DEFINE_ALGORITHM(type, base) \ - auto var##type = py::class_(module, #type).def(py::init<>()); \ - var##type.doc() = MakeDocString(); \ - var##type +#define DEFINE_ALGORITHM(type, base) \ + auto var##type = py::class_(module, #type); \ + var##type.doc() = MakeDocString(); \ + var##type.def(py::init<>()) #define DEFINE_ALGORITHM_BASE(base) py::class_(module, #base) #define DEFINE_FD_ALGORITHM(type) DEFINE_ALGORITHM(type, FdAlgorithm) #define DEFINE_AR_ALGORITHM(type) DEFINE_ALGORITHM(type, ArAlgorithm) @@ -61,7 +61,7 @@ INITIALIZE_EASYLOGGINGPP namespace { template std::string MakeDocString() { - AlgoType algo = AlgoType(); + auto algo = AlgoType(); std::stringstream docstring; docstring << "Options:\n"; for (std::string_view option_name : algo.GetPossibleOptions()) {