Commit 1649e363 authored by Patrik Huber's avatar Patrik Huber

Replaced deprecated .check() with call to operator bool

pybind11 deprecated .check().
parent 98a58300
...@@ -44,7 +44,7 @@ struct type_caster<glm::tvec2<T, P>> ...@@ -44,7 +44,7 @@ struct type_caster<glm::tvec2<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 1) // a 1-dimensional vector if (buf.ndim() == 1) // a 1-dimensional vector
...@@ -88,7 +88,7 @@ struct type_caster<glm::tvec3<T, P>> ...@@ -88,7 +88,7 @@ struct type_caster<glm::tvec3<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 1) // a 1-dimensional vector if (buf.ndim() == 1) // a 1-dimensional vector
...@@ -132,7 +132,7 @@ struct type_caster<glm::tvec4<T, P>> ...@@ -132,7 +132,7 @@ struct type_caster<glm::tvec4<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 1) // a 1-dimensional vector if (buf.ndim() == 1) // a 1-dimensional vector
...@@ -177,7 +177,7 @@ struct type_caster<glm::tmat3x3<T, P>> ...@@ -177,7 +177,7 @@ struct type_caster<glm::tmat3x3<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 2) // a 2-dimensional matrix if (buf.ndim() == 2) // a 2-dimensional matrix
...@@ -225,7 +225,7 @@ struct type_caster<glm::tmat4x3<T, P>> ...@@ -225,7 +225,7 @@ struct type_caster<glm::tmat4x3<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 2) // a 2-dimensional matrix if (buf.ndim() == 2) // a 2-dimensional matrix
...@@ -273,7 +273,7 @@ struct type_caster<glm::tmat4x4<T, P>> ...@@ -273,7 +273,7 @@ struct type_caster<glm::tmat4x4<T, P>>
bool load(handle src, bool) bool load(handle src, bool)
{ {
array_t<Scalar> buf(src, true); array_t<Scalar> buf(src, true);
if (!buf.check()) if (!buf)
return false; return false;
if (buf.ndim() == 2) // a 2-dimensional matrix if (buf.ndim() == 2) // a 2-dimensional matrix
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment