Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
2db5e88c
Commit
2db5e88c
authored
Jan 27, 2016
by
jcarpent
Browse files
[C++] Remove warning by cast
parent
9fe4cbcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/multibody/model.hxx
View file @
2db5e88c
//
// Copyright (c) 2015 CNRS
// Copyright (c) 2015
-2016
CNRS
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
// This file is part of Pinocchio
...
...
@@ -155,10 +155,10 @@ namespace se3
inline
Model
::
Index
Model
::
getJointId
(
const
std
::
string
&
name
)
const
{
std
::
vector
<
std
::
string
>::
iterator
::
difference_type
res
=
std
::
find
(
names
.
begin
(),
names
.
end
(),
name
)
-
names
.
begin
();
typedef
std
::
vector
<
std
::
string
>::
iterator
::
difference_type
it_diff_t
;
it_diff_t
res
=
std
::
find
(
names
.
begin
(),
names
.
end
(),
name
)
-
names
.
begin
();
assert
(
(
res
<
INT_MAX
)
&&
"Id superior to int range. Should never happen."
);
assert
(
(
res
>=
0
)
&&
(
res
<
joints
.
size
())
&&
"The joint name you asked does not exist"
);
assert
(
(
res
>=
0
)
&&
(
res
<
(
it_diff_t
)
joints
.
size
())
&&
"The joint name you asked does not exist"
);
return
Model
::
Index
(
res
);
}
...
...
Write
Preview
Supports
Markdown
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