mirror of https://github.com/davisking/dlib.git
Fixed compiler warnings
This commit is contained in:
parent
ccd8b64f1b
commit
2dd970a1fb
|
@ -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);
|
||||||
|
|
|
@ -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>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue