summaryrefslogtreecommitdiff
path: root/src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
diff options
context:
space:
mode:
authorAki Koskinen <qt@akikoskinen.info>2015-01-06 09:06:42 +0200
committerNikolai Kosjar <nikolai.kosjar@theqtcompany.com>2015-01-07 12:05:50 +0100
commit7661ba74eda5b896f94286eb882efb216708ba4f (patch)
treeeb48440af6a670c03a38071989f5f562211daa3f /src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp
parente6f94433947ced362ac1a21eca064367973a2104 (diff)
downloadqt-creator-7661ba74eda5b896f94286eb882efb216708ba4f.tar.gz
Prevent using an invalidated reference
Inserting to a std::vector (possibly) invalidates all iterators and references for it. In this piece of code tok is a reference to a member in _tokens and it should not be used after an insertion is made to _tokens. Switched the order of two code lines to prevent this. Change-Id: Ia9d1ce66fc67406f56b426e7431402c6fe68a38f Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
Diffstat (limited to 'src/tools/cplusplus-update-frontend/cplusplus-update-frontend.cpp')
0 files changed, 0 insertions, 0 deletions