summaryrefslogtreecommitdiff
path: root/src/PeerSessionResource.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-02-28 12:30:11 +0000
commitc342bde9627b434effbc0cd10b817670d1da0923 (patch)
tree60d14bf448066b8dcd639adfa0db716d5a8258c8 /src/PeerSessionResource.h
parent135f0a2a8c4ee04a5e96d84ba558245fabfc1f5c (diff)
2010-02-28 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use vector instead of deque for containers which is used for mostly read-only purpose.
Diffstat (limited to 'src/PeerSessionResource.h')
-rw-r--r--src/PeerSessionResource.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/PeerSessionResource.h b/src/PeerSessionResource.h
index 016cf7a1..7e191275 100644
--- a/src/PeerSessionResource.h
+++ b/src/PeerSessionResource.h
@@ -36,11 +36,13 @@
#define _D_PEER_SESSION_RESOURCE_H_
#include "common.h"
+
+#include <string>
+#include <vector>
+
#include "BtConstants.h"
#include "PeerStat.h"
#include "TimeA2.h"
-#include <string>
-#include <deque>
namespace aria2 {
@@ -67,9 +69,9 @@ private:
BitfieldMan* _bitfieldMan;
bool _fastExtensionEnabled;
// fast index set which a peer has sent to localhost.
- std::deque<size_t> _peerAllowedIndexSet;
+ std::vector<size_t> _peerAllowedIndexSet;
// fast index set which localhost has sent to a peer.
- std::deque<size_t> _amAllowedIndexSet;
+ std::vector<size_t> _amAllowedIndexSet;
bool _extendedMessagingEnabled;
Extensions _extensions;
bool _dhtEnabled;
@@ -165,14 +167,14 @@ public:
void fastExtensionEnabled(bool b);
// fast index set which a peer has sent to localhost.
- const std::deque<size_t>& peerAllowedIndexSet() const;
+ const std::vector<size_t>& peerAllowedIndexSet() const;
void addPeerAllowedIndex(size_t index);
bool peerAllowedIndexSetContains(size_t index) const;
// fast index set which localhost has sent to a peer.
- const std::deque<size_t>& amAllowedIndexSet() const
+ const std::vector<size_t>& amAllowedIndexSet() const
{
return _amAllowedIndexSet;
}