r600/sb: cleanup if_conversion iterator to be legal C++
authorDave Airlie <airlied@redhat.com>
Fri, 29 Jun 2018 02:47:26 +0000 (03:47 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Jul 2018 06:42:22 +0000 (07:42 +0100)
commit8c51caab2404c5c9f5211936d27e9fe1c0af2e7d
tree9b79dca8ee8e62e4574333ba61b2dda801a89ace
parent45f9d58668079803abe64d2f104468ee118f78ea
r600/sb: cleanup if_conversion iterator to be legal C++

The current code causes:
/usr/include/c++/8/debug/safe_iterator.h:207:
Error: attempt to copy from a singular iterator.

This is due to the iterators getting invalidated, fix the
reverse iterator to use the return value from erase, and
cast it properly.

(used Mathias suggestion)
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Mathias Fröhlich <mathias.froehlich@web.de>
src/gallium/drivers/r600/sb/sb_if_conversion.cpp