diff options
author | Thales1330 <thaleslima.ufu@gmail.com> | 2017-01-05 19:31:28 -0200 |
---|---|---|
committer | Thales1330 <thaleslima.ufu@gmail.com> | 2017-01-05 19:31:28 -0200 |
commit | b6f96ca48bc156898df79deba63d270b393fb150 (patch) | |
tree | 9c6e2fa2a45d6c6c4c14d8711b2b89066bfb37d7 /Project/ElementDataObject.cpp | |
parent | a1932eec23589ed67d824873b37de3e83a09cd24 (diff) | |
download | PSP.git-b6f96ca48bc156898df79deba63d270b393fb150.tar.gz PSP.git-b6f96ca48bc156898df79deba63d270b393fb150.tar.xz PSP.git-b6f96ca48bc156898df79deba63d270b393fb150.zip |
Text bugs fixed
Diffstat (limited to 'Project/ElementDataObject.cpp')
-rw-r--r-- | Project/ElementDataObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Project/ElementDataObject.cpp b/Project/ElementDataObject.cpp index a5ac165..0ea01cb 100644 --- a/Project/ElementDataObject.cpp +++ b/Project/ElementDataObject.cpp @@ -15,8 +15,8 @@ ElementDataObject::ElementDataObject(std::vector<Element*> elementList) for(auto it = elementList.begin(), itEnd = elementList.end(); it != itEnd; ++it) { Element* copy = (*it)->GetCopy(); if(copy) { - if(typeid(*copy) == typeid(Bus)) - m_elementsLists->parentList.push_back((Bus*)copy); + if(Bus* bus = dynamic_cast<Bus*>(copy)) + m_elementsLists->parentList.push_back(bus); else m_elementsLists->elementList.push_back(copy); } |