Fixed release build

This commit is contained in:
Bartek Kryza
2022-06-08 23:33:53 +02:00
parent 0e7c30541a
commit 844bfcdbcd
8 changed files with 45 additions and 28 deletions

View File

@@ -28,6 +28,8 @@ public:
class_member(common::model::access_t access, const std::string &name,
const std::string &type);
virtual ~class_member() = default;
bool is_relationship() const;
void is_relationship(bool is_relationship);

View File

@@ -139,8 +139,9 @@ bool diagram::add_class(std::unique_ptr<class_> &&c)
const auto &el = get_element<class_>(name_and_ns).value();
assert(el.name() == name);
assert(el.get_relative_namespace() == ns);
if ((el.name() != name) || !(el.get_relative_namespace() == ns))
throw std::runtime_error(
"Invalid element stored in the diagram tree");
return true;
}