Skip to content
Snippets Groups Projects
Commit 19cdd7c7 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed assert and inline issue

parent ff65e20b
No related branches found
No related tags found
1 merge request!1190.2.1
Pipeline #44829 failed
......@@ -86,7 +86,7 @@ public:
template<class T> void addAttr(const std::string& name, const T& value)
{
const auto& res = mAttrs.emplace(std::make_pair(name, future_std::any(value)));
assert(res.second && "attribute already exists");
AIDGE_ASSERT(res.second, "attribute already exists");
#ifdef PYBIND
// We cannot handle Python object if the Python interpreter is not running
......@@ -129,10 +129,10 @@ public:
void addAttrPy(const std::string& name, py::object&& value)
{
auto it = mAttrs.find(name);
assert(it == mAttrs.end() && "attribute already exists");
AIDGE_ASSERT(it == mAttrs.end(), "attribute already exists");
const auto& res = mAttrsPy.emplace(std::make_pair(name, value));
assert(res.second && "attribute already exists");
AIDGE_ASSERT(res.second, "attribute already exists");
}
void setAttrPy(const std::string& name, py::object&& value) override final
......@@ -199,6 +199,8 @@ public:
};
#endif
virtual ~DynamicAttributes() {}
private:
#ifdef PYBIND
// Stores C++ attributes (copy) and Python-only attributes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment