Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Algorithms Library Toolkit Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Algorithms Library Toolkit
Algorithms Library Toolkit Core
Commits
50099681
There was a problem fetching the pipeline summary.
Commit
50099681
authored
7 years ago
by
Jan Trávníček
Browse files
Options
Downloads
Patches
Plain Diff
fix unused parameter warning on g++
parent
c7b07a8a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
alib2common/src/abstraction/AlgorithmRegistry.hpp
+3
-6
3 additions, 6 deletions
alib2common/src/abstraction/AlgorithmRegistry.hpp
with
3 additions
and
6 deletions
alib2common/src/abstraction/AlgorithmRegistry.hpp
+
3
−
6
View file @
50099681
...
@@ -66,6 +66,9 @@ class AlgorithmRegistry {
...
@@ -66,6 +66,9 @@ class AlgorithmRegistry {
template
<
class
...
ParamTypes
>
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
)
{
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
;
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 */
unsigned
i
=
0
;
/* the evaluation order in initializer list is actually defined */
...
@@ -88,9 +91,6 @@ class AlgorithmRegistry {
...
@@ -88,9 +91,6 @@ class AlgorithmRegistry {
public:
public:
template
<
class
Algo
,
class
ReturnType
,
class
...
ParamTypes
>
template
<
class
Algo
,
class
ReturnType
,
class
...
ParamTypes
>
static
void
registerAlgorithm
(
ReturnType
(
*
callback
)
(
ParamTypes
...
),
AlgorithmCategories
::
AlgorithmCategory
category
,
std
::
array
<
std
::
string
,
sizeof
...
(
ParamTypes
)
>
paramNames
)
{
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
>
(
);
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
::
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
>
(
);
ext
::
pair
<
std
::
string
,
ext
::
set
<
abstraction
::
ParamQualifiers
::
ParamQualifier
>
>
result
=
convertReturnType
<
ReturnType
>
(
);
...
@@ -103,9 +103,6 @@ public:
...
@@ -103,9 +103,6 @@ public:
template
<
class
Algo
,
class
...
ParamTypes
>
template
<
class
Algo
,
class
...
ParamTypes
>
static
void
registerWrapper
(
std
::
shared_ptr
<
abstraction
::
OperationAbstraction
>
(
*
callback
)
(
ParamTypes
...
),
std
::
array
<
std
::
string
,
sizeof
...
(
ParamTypes
)
>
paramNames
)
{
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
;
AlgorithmCategories
::
AlgorithmCategory
category
=
AlgorithmCategories
::
AlgorithmCategory
::
DEFAULT
;
std
::
string
algorithm
=
ext
::
to_string
<
Algo
>
(
);
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
::
vector
<
ext
::
tuple
<
std
::
string
,
ext
::
set
<
abstraction
::
ParamQualifiers
::
ParamQualifier
>
,
std
::
string
>
>
params
=
convertParamTypes
<
ParamTypes
...
>
(
paramNames
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment