Skip to content

Commit

Permalink
Fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Apr 15, 2024
1 parent b99b119 commit 4a1ed2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/templates/macros/implementations.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Mutable{{ type }} {{ full_type }}::clone() const {
{% for relation in multi_relations %}
// If the current object has been read from a file, then the object may only have a slice of the relation vector
// so this slice has to be copied in case we want to modify it
if (m_obj->data.{{ relation.name }}_end != m_obj->m_{{ relation.name }}->size()) {
if (m_obj->data.{{ relation.name }}_end - m_obj->data.{{ relation.name }}_begin != m_obj->m_{{ relation.name }}->size()) {
tmp.m_obj->m_{{ relation.name }} = new std::vector<{{ relation.full_type }}>(m_obj->m_{{ relation.name }}->begin() + m_obj->data.{{ relation.name }}_begin, m_obj->m_{{ relation.name }}->begin() + m_obj->data.{{ relation.name }}_end);
tmp.m_obj->data.{{ relation.name }}_begin = 0;
tmp.m_obj->data.{{ relation.name }}_end = tmp.m_obj->m_{{ relation.name }}->size();
Expand Down

0 comments on commit 4a1ed2d

Please sign in to comment.