summaryrefslogtreecommitdiff
path: root/src/PeerStat.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-08 21:38:00 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-12-09 21:39:43 +0900
commitf0bcfa822e848b7bf89ec7a16407159187283a48 (patch)
tree9e0aa8a06789925a02675dfb8173ad4931604d9b /src/PeerStat.h
parentb97a7c8ecf410daaac12346c91591d15772f3c7f (diff)
Use int instead of unsigned int where unsigned int is not needed.
Diffstat (limited to 'src/PeerStat.h')
-rw-r--r--src/PeerStat.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/PeerStat.h b/src/PeerStat.h
index c328173d..f651e9f5 100644
--- a/src/PeerStat.h
+++ b/src/PeerStat.h
@@ -59,8 +59,8 @@ private:
SpeedCalc uploadSpeed_;
Timer downloadStartTime_;
PeerStat::STATUS status_;
- unsigned int avgDownloadSpeed_;
- unsigned int avgUploadSpeed_;
+ int avgDownloadSpeed_;
+ int avgUploadSpeed_;
int64_t sessionDownloadLength_;
int64_t sessionUploadLength_;
public:
@@ -78,28 +78,28 @@ public:
/**
* Returns current download speed in byte per sec.
*/
- unsigned int calculateDownloadSpeed();
+ int calculateDownloadSpeed();
- unsigned int calculateAvgDownloadSpeed();
+ int calculateAvgDownloadSpeed();
- unsigned int calculateUploadSpeed();
+ int calculateUploadSpeed();
- unsigned int calculateAvgUploadSpeed();
+ int calculateAvgUploadSpeed();
void updateDownloadLength(size_t bytes);
void updateUploadLength(size_t bytes);
- unsigned int getMaxDownloadSpeed() const;
+ int getMaxDownloadSpeed() const;
- unsigned int getMaxUploadSpeed() const;
+ int getMaxUploadSpeed() const;
- unsigned int getAvgDownloadSpeed() const
+ int getAvgDownloadSpeed() const
{
return avgDownloadSpeed_;
}
- unsigned int getAvgUploadSpeed() const
+ int getAvgUploadSpeed() const
{
return avgUploadSpeed_;
}