Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
2dd970a1
Commit
2dd970a1
authored
Apr 14, 2019
by
Davis King
Browse files
Fixed compiler warnings
parent
ccd8b64f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
tools/python/src/basic.cpp
tools/python/src/basic.cpp
+1
-1
tools/python/src/svm_struct.cpp
tools/python/src/svm_struct.cpp
+1
-1
tools/python/src/vector.cpp
tools/python/src/vector.cpp
+1
-1
No files found.
tools/python/src/basic.cpp
View file @
2dd970a1
...
@@ -19,7 +19,7 @@ std::shared_ptr<std::vector<double> > array_from_object(py::object obj)
...
@@ -19,7 +19,7 @@ std::shared_ptr<std::vector<double> > array_from_object(py::object obj)
try
{
try
{
long
nr
=
obj
.
cast
<
long
>
();
long
nr
=
obj
.
cast
<
long
>
();
return
std
::
make_shared
<
std
::
vector
<
double
>>
(
nr
);
return
std
::
make_shared
<
std
::
vector
<
double
>>
(
nr
);
}
catch
(
py
::
cast_error
&
e
)
{
}
catch
(
py
::
cast_error
&
)
{
py
::
list
li
=
obj
.
cast
<
py
::
list
>
();
py
::
list
li
=
obj
.
cast
<
py
::
list
>
();
const
long
nr
=
len
(
li
);
const
long
nr
=
len
(
li
);
auto
temp
=
std
::
make_shared
<
std
::
vector
<
double
>>
(
nr
);
auto
temp
=
std
::
make_shared
<
std
::
vector
<
double
>>
(
nr
);
...
...
tools/python/src/svm_struct.cpp
View file @
2dd970a1
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
try
{
try
{
loss
=
t
[
0
].
cast
<
scalar_type
>
();
loss
=
t
[
0
].
cast
<
scalar_type
>
();
psi
=
t
[
1
].
cast
<
feature_vector_type
&>
();
psi
=
t
[
1
].
cast
<
feature_vector_type
&>
();
}
catch
(
py
::
cast_error
&
e
)
{
}
catch
(
py
::
cast_error
&
)
{
psi
=
t
[
0
].
cast
<
feature_vector_type
&>
();
psi
=
t
[
0
].
cast
<
feature_vector_type
&>
();
loss
=
t
[
1
].
cast
<
scalar_type
>
();
loss
=
t
[
1
].
cast
<
scalar_type
>
();
}
}
...
...
tools/python/src/vector.cpp
View file @
2dd970a1
...
@@ -59,7 +59,7 @@ std::shared_ptr<cv> cv_from_object(py::object obj)
...
@@ -59,7 +59,7 @@ std::shared_ptr<cv> cv_from_object(py::object obj)
auto
temp
=
std
::
make_shared
<
cv
>
(
nr
);
auto
temp
=
std
::
make_shared
<
cv
>
(
nr
);
*
temp
=
0
;
*
temp
=
0
;
return
temp
;
return
temp
;
}
catch
(
py
::
cast_error
&
e
)
{
}
catch
(
py
::
cast_error
&
)
{
py
::
list
li
=
obj
.
cast
<
py
::
list
>
();
py
::
list
li
=
obj
.
cast
<
py
::
list
>
();
const
long
nr
=
len
(
obj
);
const
long
nr
=
len
(
obj
);
auto
temp
=
std
::
make_shared
<
cv
>
(
nr
);
auto
temp
=
std
::
make_shared
<
cv
>
(
nr
);
...
...
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