Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
8103ae63
Commit
8103ae63
authored
2 years ago
by
Adrien Béraud
Committed by
Adrien Béraud
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
EnumClass: fix warning
Change-Id: I691a69db206103821187b8d8f76459e046ac9b9f
parent
b5b95ad5
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/enumclass_utils.h
+8
-11
8 additions, 11 deletions
src/enumclass_utils.h
with
8 additions
and
11 deletions
src/enumclass_utils.h
+
8
−
11
View file @
8103ae63
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
* along with this program; if not, write to the Free Software
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
*/
#ifndef ENUM_CLASS_UTILS_H
#pragma once
#define ENUM_CLASS_UTILS_H
#include
<map>
#include
"logger.h"
#include
"logger.h"
#include
<map>
#include
<type_traits>
#include
<type_traits>
#include
<vector>
#include
<vector>
#include
<cassert>
#include
<cassert>
...
@@ -30,10 +30,9 @@ namespace jami {
...
@@ -30,10 +30,9 @@ namespace jami {
/**
/**
* This function adds a safe way to get an enum class size
* This function adds a safe way to get an enum class size
* @note it cannot be unsigned to avoid some compiler warnings
*/
*/
template
<
typename
A
>
template
<
typename
A
>
constexpr
inline
in
t
constexpr
inline
size_
t
enum_class_size
()
enum_class_size
()
{
{
return
size_t
(
A
::
COUNT__
);
return
size_t
(
A
::
COUNT__
);
...
@@ -65,7 +64,7 @@ struct Matrix1D
...
@@ -65,7 +64,7 @@ struct Matrix1D
class
EnumClassIter
class
EnumClassIter
{
{
public:
public:
EnumClassIter
(
const
Matrix1D
<
Row
,
Value
,
A
>*
p_vec
,
in
t
pos
)
EnumClassIter
(
const
Matrix1D
<
Row
,
Value
,
A
>*
p_vec
,
size_
t
pos
)
:
pos_
(
pos
)
:
pos_
(
pos
)
,
p_vec_
(
p_vec
)
,
p_vec_
(
p_vec
)
{}
{}
...
@@ -75,7 +74,7 @@ struct Matrix1D
...
@@ -75,7 +74,7 @@ struct Matrix1D
const
EnumClassIter
&
operator
++
();
const
EnumClassIter
&
operator
++
();
private
:
private
:
in
t
pos_
;
size_
t
pos_
;
const
Matrix1D
<
Row
,
Value
,
A
>*
p_vec_
;
const
Matrix1D
<
Row
,
Value
,
A
>*
p_vec_
;
};
};
...
@@ -112,7 +111,7 @@ struct Matrix0D
...
@@ -112,7 +111,7 @@ struct Matrix0D
class
EnumClassIter
class
EnumClassIter
{
{
public:
public:
EnumClassIter
(
const
Matrix0D
<
EnumClass
>*
p_vec
,
in
t
pos
)
EnumClassIter
(
const
Matrix0D
<
EnumClass
>*
p_vec
,
size_
t
pos
)
:
pos_
(
pos
)
:
pos_
(
pos
)
,
p_vec_
(
p_vec
)
,
p_vec_
(
p_vec
)
{}
{}
...
@@ -122,7 +121,7 @@ struct Matrix0D
...
@@ -122,7 +121,7 @@ struct Matrix0D
const
EnumClassIter
&
operator
++
();
const
EnumClassIter
&
operator
++
();
private
:
private
:
in
t
pos_
;
size_
t
pos_
;
const
Matrix0D
<
EnumClass
>*
p_vec_
;
const
Matrix0D
<
EnumClass
>*
p_vec_
;
};
};
...
@@ -308,5 +307,3 @@ Matrix1D<Row, Value, Accessor>::end()
...
@@ -308,5 +307,3 @@ Matrix1D<Row, Value, Accessor>::end()
}
}
}
// namespace jami
}
// namespace jami
#endif // ENUM_CLASS_UTILS_H
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