use vector::erase with std::remove_if am: 0c52b65211 am: caafff5d40

Change-Id: Idc80ac3ac9eead1d9a3f5035d60fdbf27bae9c29