From abb434f63aaf85c478b09b1fd95291a960950d99 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 13 May 2007 00:18:04 +0000 Subject: [PATCH] fixed an issue with fastlink iterators not working right --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40778 --- core/MenuStyle_Valve.cpp | 6 ++---- core/sm_fastlink.h | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/MenuStyle_Valve.cpp b/core/MenuStyle_Valve.cpp index c507f39f..ed499660 100644 --- a/core/MenuStyle_Valve.cpp +++ b/core/MenuStyle_Valve.cpp @@ -189,10 +189,8 @@ void ValveMenuStyle::ProcessWatchList() return; } - FastLink::iterator iter; - unsigned int total = 0; - for (iter=m_WatchList.begin(); iter!=m_WatchList.end(); ++iter) + for (FastLink::iterator iter=m_WatchList.begin(); iter!=m_WatchList.end(); ++iter) { do_lookup[total++] = (*iter); } @@ -211,7 +209,7 @@ void ValveMenuStyle::ProcessWatchList() } if (curTime > player->menuStartTime + player->menuHoldTime) { - _CancelMenu(i, false); + _CancelMenu(client, false); } } } diff --git a/core/sm_fastlink.h b/core/sm_fastlink.h index 507a9926..bc204558 100644 --- a/core/sm_fastlink.h +++ b/core/sm_fastlink.h @@ -93,11 +93,11 @@ public: public: bool operator ==(const iterator &where) const { - return (link == link && position == position); + return (link == where.link && position == where.position); } bool operator !=(const iterator &where) const { - return (link != link || position != position); + return (link != where.link || position != where.position); } T & operator *() {