[prev in list] [next in list] [prev in thread] [next in thread] 

List:       atlantik-devel
Subject:    [atlantik-cvs] CVS: kdegames/atlantik/libatlantic trade.cpp, 1.26,
From:       kde () office ! kde ! org
Date:       2004-10-14 1:28:32
Message-ID: 416DD640.mailAGY1U8RKO () office ! kde ! org
[Download RAW message or body]

Update of /home/kde/kdegames/atlantik/libatlantic
In directory office:/tmp/cvs-serv13528/libatlantic

Modified Files:
      Tag: KDE_3_3_BRANCH
	trade.cpp trade.h 
Log Message:
bugfix: show correct amount of players in trade widget

Index: trade.cpp
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/trade.cpp,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -d -r1.26 -r1.26.2.1
--- trade.cpp	10 Feb 2004 19:46:35 -0000	1.26
+++ trade.cpp	14 Oct 2004 01:28:30 -0000	1.26.2.1
@@ -38,29 +38,20 @@
 
 void Trade::addPlayer(Player *player)
 {
-	mPlayers.append(player);
 	m_playerAcceptMap[player] = false;
 }
 
 void Trade::removePlayer(Player *player)
 {
-	mPlayers.remove(player);
 	m_playerAcceptMap[player] = false;
 }
 
-QPtrList<Player> Trade::players() const
-{
-	return mPlayers;
-}
-
-unsigned int Trade::acceptCount()
+unsigned int Trade::count( bool acceptOnly )
 {
 	unsigned int count = 0;
 	for (QMapIterator<Player *, bool> it = m_playerAcceptMap.begin() ; it != \
                m_playerAcceptMap.end() ; ++it)
-	{
-		if (it.data())
+		if ( !acceptOnly || it.data() )
 			count++;
-	}
 	return count;
 }
 

Index: trade.h
===================================================================
RCS file: /home/kde/kdegames/atlantik/libatlantic/trade.h,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -d -r1.20 -r1.20.2.1
--- trade.h	10 Feb 2004 19:46:35 -0000	1.20
+++ trade.h	14 Oct 2004 01:28:30 -0000	1.20.2.1
@@ -107,8 +107,7 @@
 	void addPlayer(Player *player);
 	void removePlayer(Player *player);
 	
-	QPtrList<Player> players() const;
-	unsigned int acceptCount();
+	unsigned int count( bool acceptOnly );
 
 	bool isRejected() { return m_rejected; }
 	

_______________________________________________
atlantik-cvs mailing list
atlantik-cvs@kde.org
https://mail.kde.org/mailman/listinfo/atlantik-cvs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic