From a81ff1e90c3b481690a98af1bff3a5cbe671535d Mon Sep 17 00:00:00 2001 From: Marc Garcia Puig Date: Mon, 11 Feb 2019 18:09:36 +0100 Subject: [PATCH] Fixed bool comparison overloads in pyhon client --- PythonAPI/source/libcarla/Blueprint.cpp | 54 ++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/PythonAPI/source/libcarla/Blueprint.cpp b/PythonAPI/source/libcarla/Blueprint.cpp index 01c3a7639..b0f99b42c 100644 --- a/PythonAPI/source/libcarla/Blueprint.cpp +++ b/PythonAPI/source/libcarla/Blueprint.cpp @@ -98,33 +98,33 @@ void export_blueprint() { ; class_("ActorAttribute", no_init) - .add_property("id", CALL_RETURNING_COPY(cc::ActorAttribute, GetId)) - .add_property("type", &cc::ActorAttribute::GetType) - .add_property("recommended_values", CALL_RETURNING_LIST(cc::ActorAttribute, GetRecommendedValues)) - .add_property("is_modifiable", &cc::ActorAttribute::IsModifiable) - .def("as_bool", &cc::ActorAttribute::As) - .def("as_int", &cc::ActorAttribute::As) - .def("as_float", &cc::ActorAttribute::As) - .def("as_str", &cc::ActorAttribute::As) - .def("as_color", &cc::ActorAttribute::As) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__eq__", &cc::ActorAttribute::operator==) - // .def("__ne__", &cc::ActorAttribute::operator!=) - // .def("__ne__", &cc::ActorAttribute::operator!=) - // .def("__ne__", &cc::ActorAttribute::operator!=) - // .def("__ne__", &cc::ActorAttribute::operator!=) - // .def("__ne__", &cc::ActorAttribute::operator!=) - // .def("__ne__", &cc::ActorAttribute::operator!=) - .def("__nonzero__", &cc::ActorAttribute::As) - .def("__bool__", &cc::ActorAttribute::As) - .def("__int__", &cc::ActorAttribute::As) - .def("__float__", &cc::ActorAttribute::As) - .def("__str__", &cc::ActorAttribute::As) - .def(self_ns::str(self_ns::self)) + .add_property("id", CALL_RETURNING_COPY(cc::ActorAttribute, GetId)) + .add_property("type", &cc::ActorAttribute::GetType) + .add_property("recommended_values", CALL_RETURNING_LIST(cc::ActorAttribute, GetRecommendedValues)) + .add_property("is_modifiable", &cc::ActorAttribute::IsModifiable) + .def("as_bool", &cc::ActorAttribute::As) + .def("as_int", &cc::ActorAttribute::As) + .def("as_float", &cc::ActorAttribute::As) + .def("as_str", &cc::ActorAttribute::As) + .def("as_color", &cc::ActorAttribute::As) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__eq__", &cc::ActorAttributeValueAccess::operator==) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__ne__", &cc::ActorAttributeValueAccess::operator!=) + .def("__nonzero__", &cc::ActorAttribute::As) + .def("__bool__", &cc::ActorAttribute::As) + .def("__int__", &cc::ActorAttribute::As) + .def("__float__", &cc::ActorAttribute::As) + .def("__str__", &cc::ActorAttribute::As) + .def(self_ns::str(self_ns::self)) ; class_("ActorBlueprint", no_init)