1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-07-05 03:22:56 +00:00

Make clang-tidy happy

This commit is contained in:
Carles Fernandez 2020-06-13 21:13:46 +02:00
parent dcf9bc52c4
commit b712c98a5b
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -178,8 +178,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
{ {
size_t input_size = item_type_size(input_type); size_t input_size = item_type_size(input_type);
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, input_size); // NOLINT(modernize-avoid-bind)
std::placeholders::_3, input_size);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); };
#endif #endif
@ -190,8 +189,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "short") if (output_type == "short")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8i_16i, std::placeholders::_1, return std::bind(convert_8i_16i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_16i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_16i(arg1, arg2, arg3); };
#endif #endif
@ -199,8 +197,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "float") else if (output_type == "float")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8i_32f, std::placeholders::_1, return std::bind(convert_8i_32f, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_32f(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_32f(arg1, arg2, arg3); };
#endif #endif
@ -212,8 +209,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
{ {
size_t input_size = item_type_size(input_type); size_t input_size = item_type_size(input_type);
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, input_size); // NOLINT(modernize-avoid-bind)
std::placeholders::_3, input_size);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); };
#endif #endif
@ -221,8 +217,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "cshort" or output_type == "ishort") if (output_type == "cshort" or output_type == "ishort")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8ic_16ic, std::placeholders::_1, return std::bind(convert_8ic_16ic, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8ic_16ic(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8ic_16ic(arg1, arg2, arg3); };
#endif #endif
@ -230,8 +225,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "gr_complex") else if (output_type == "gr_complex")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8ic_32fc, std::placeholders::_1, return std::bind(convert_8ic_32fc, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8ic_32fc(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8ic_32fc(arg1, arg2, arg3); };
#endif #endif
@ -243,8 +237,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
{ {
size_t input_size = item_type_size(input_type); size_t input_size = item_type_size(input_type);
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, input_size); // NOLINT(modernize-avoid-bind)
std::placeholders::_3, input_size);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); };
#endif #endif
@ -252,8 +245,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "cshort" or output_type == "ishort") else if (output_type == "cshort" or output_type == "ishort")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8i_16i, std::placeholders::_1, return std::bind(convert_8i_16i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_16i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_16i(arg1, arg2, arg3); };
#endif #endif
@ -261,8 +253,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "gr_complex") else if (output_type == "gr_complex")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_8i_32f, std::placeholders::_1, return std::bind(convert_8i_32f, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_32f(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_8i_32f(arg1, arg2, arg3); };
#endif #endif
@ -273,8 +264,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "byte") if (output_type == "byte")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16i_8i, std::placeholders::_1, return std::bind(convert_16i_8i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_8i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_8i(arg1, arg2, arg3); };
#endif #endif
@ -282,8 +272,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "float") else if (output_type == "float")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16i_32f, std::placeholders::_1, return std::bind(convert_16i_32f, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_32f(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_32f(arg1, arg2, arg3); };
#endif #endif
@ -294,8 +283,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "cbyte" or output_type == "ibyte") if (output_type == "cbyte" or output_type == "ibyte")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16ic_8ic, std::placeholders::_1, return std::bind(convert_16ic_8ic, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16ic_8ic(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16ic_8ic(arg1, arg2, arg3); };
#endif #endif
@ -304,8 +292,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
{ {
size_t input_size = item_type_size(input_type); size_t input_size = item_type_size(input_type);
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, input_size); // NOLINT(modernize-avoid-bind)
std::placeholders::_3, input_size);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); };
#endif #endif
@ -313,8 +300,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "gr_complex") else if (output_type == "gr_complex")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16ic_32fc, std::placeholders::_1, return std::bind(convert_16ic_32fc, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16ic_32fc(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16ic_32fc(arg1, arg2, arg3); };
#endif #endif
@ -325,8 +311,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "cbyte" or output_type == "ibyte") if (output_type == "cbyte" or output_type == "ibyte")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16i_8i, std::placeholders::_1, return std::bind(convert_16i_8i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_8i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_8i(arg1, arg2, arg3); };
#endif #endif
@ -335,8 +320,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
{ {
size_t input_size = item_type_size(input_type); size_t input_size = item_type_size(input_type);
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, return std::bind(copy_converter, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, input_size); // NOLINT(modernize-avoid-bind)
std::placeholders::_3, input_size);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return copy_converter(arg1, arg2, arg3, input_size); };
#endif #endif
@ -344,8 +328,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "gr_complex") else if (output_type == "gr_complex")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_16i_32f, std::placeholders::_1, return std::bind(convert_16i_32f, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_32f(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_16i_32f(arg1, arg2, arg3); };
#endif #endif
@ -356,8 +339,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "byte") if (output_type == "byte")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_32f_8i, std::placeholders::_1, return std::bind(convert_32f_8i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32f_8i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32f_8i(arg1, arg2, arg3); };
#endif #endif
@ -365,8 +347,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "short") else if (output_type == "short")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_32f_16i, std::placeholders::_1, return std::bind(convert_32f_16i, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32f_16i(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32f_16i(arg1, arg2, arg3); };
#endif #endif
@ -377,8 +358,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
if (output_type == "cbyte" or output_type == "ibyte") if (output_type == "cbyte" or output_type == "ibyte")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_32fc_8ic, std::placeholders::_1, return std::bind(convert_32fc_8ic, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32fc_8ic(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32fc_8ic(arg1, arg2, arg3); };
#endif #endif
@ -386,8 +366,7 @@ item_type_converter_t make_vector_converter(const std::string &input_type,
else if (output_type == "cshort" or output_type == "ishort") else if (output_type == "cshort" or output_type == "ishort")
{ {
#ifdef DO_NOT_USE_LAMBDAS #ifdef DO_NOT_USE_LAMBDAS
return std::bind(convert_32fc_16ic, std::placeholders::_1, return std::bind(convert_32fc_16ic, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); // NOLINT(modernize-avoid-bind)
std::placeholders::_2, std::placeholders::_3);
#else #else
return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32fc_16ic(arg1, arg2, arg3); }; return [=](auto &&arg1, auto &&arg2, auto &&arg3) { return convert_32fc_16ic(arg1, arg2, arg3); };
#endif #endif