Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6e869a71
authored
Jan 19, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
algorithms_cpp: removed cppcheck style warnings
parent
15110fad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
algorithms_cpp/test/zip_iterator_test.cc
+5
-5
No files found.
algorithms_cpp/test/zip_iterator_test.cc
View file @
6e869a71
...
...
@@ -40,16 +40,16 @@ typedef std::vector<int>::const_iterator constVectorIterator;
struct
DotProductFunctor
{
template
<
typename
TypeA
,
typename
TypeB
>
int
operator
()(
embb
::
algorithms
::
ZipPair
<
TypeA
,
TypeB
>
pair
)
{
int
operator
()(
embb
::
algorithms
::
ZipPair
<
TypeA
,
TypeB
>
pair
)
const
{
return
pair
.
First
()
*
pair
.
Second
();
}
template
<
typename
TypeA
,
typename
TypeB
>
int
operator
()(
int
lhs
,
embb
::
algorithms
::
ZipPair
<
TypeA
,
TypeB
>
rhs
)
{
int
operator
()(
int
lhs
,
embb
::
algorithms
::
ZipPair
<
TypeA
,
TypeB
>
rhs
)
const
{
return
lhs
+
rhs
.
First
()
*
rhs
.
Second
();
}
int
operator
()(
int
lhs
,
int
rhs
)
{
int
operator
()(
int
lhs
,
int
rhs
)
const
{
return
lhs
+
rhs
;
}
};
...
...
@@ -59,7 +59,7 @@ struct DotProductFunctor {
* The result overwrites the original number.
*/
struct
Square
{
void
operator
()(
embb
::
algorithms
::
ZipPair
<
int
&
,
int
&>
pair
)
{
void
operator
()(
embb
::
algorithms
::
ZipPair
<
int
&
,
int
&>
pair
)
const
{
pair
.
First
()
=
pair
.
First
()
*
pair
.
First
();
pair
.
Second
()
=
pair
.
Second
()
*
pair
.
Second
();
}
...
...
@@ -189,7 +189,7 @@ void ZipIteratorTest::TestIteratorTypes() {
struct
MultiDotProductFunctor
{
mtapi_int64_t
operator
()(
embb
::
algorithms
::
ZipPair
<
embb
::
algorithms
::
ZipPair
<
int
&
,
int
&>
,
embb
::
algorithms
::
ZipPair
<
int
&
,
int
&>
>
rhs
)
{
embb
::
algorithms
::
ZipPair
<
int
&
,
int
&>
>
rhs
)
const
{
return
rhs
.
First
().
First
()
*
rhs
.
First
().
Second
()
*
rhs
.
Second
().
First
()
*
rhs
.
Second
().
Second
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment