Skip to content
Snippets Groups Projects
Commit 50099681 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix unused parameter warning on g++

parent c7b07a8a
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -66,6 +66,9 @@ class AlgorithmRegistry {
 
template < class ... ParamTypes >
static ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > convertParamTypes ( std::array < std::string, sizeof ... ( ParamTypes ) > paramNames ) {
/* make unused parameter warning go away in case of sizeof ... ( ParamTypes ) == 0 */
( void ) paramNames;
ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > params;
 
unsigned i = 0; /* the evaluation order in initializer list is actually defined */
......@@ -88,9 +91,6 @@ class AlgorithmRegistry {
public:
template < class Algo, class ReturnType, class ... ParamTypes >
static void registerAlgorithm ( ReturnType ( * callback ) ( ParamTypes ... ), AlgorithmCategories::AlgorithmCategory category, std::array < std::string, sizeof ... ( ParamTypes ) > paramNames ) {
/* make unused parameter warning go away in case of sizeof ... ( ParamTypes ) == 0 */
( void ) paramNames;
std::string algorithm = ext::to_string < Algo > ( );
ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > params = convertParamTypes < ParamTypes ... > ( paramNames );
ext::pair < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier > > result = convertReturnType < ReturnType > ( );
......@@ -103,9 +103,6 @@ public:
 
template < class Algo, class ... ParamTypes >
static void registerWrapper ( std::shared_ptr < abstraction::OperationAbstraction > ( * callback ) ( ParamTypes ... ), std::array < std::string, sizeof ... ( ParamTypes ) > paramNames ) {
/* make unused parameter warning go away in case of sizeof ... ( ParamTypes ) == 0 */
( void ) paramNames;
AlgorithmCategories::AlgorithmCategory category = AlgorithmCategories::AlgorithmCategory::DEFAULT;
std::string algorithm = ext::to_string < Algo > ( );
ext::vector < ext::tuple < std::string, ext::set < abstraction::ParamQualifiers::ParamQualifier >, std::string > > params = convertParamTypes < ParamTypes ... > ( paramNames );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment