Explorar o código

2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	Made `begin' unsigned int.
	* src/GrowSegment.h
	* src/Piece.cc
	* src/Piece.h
	* src/PiecedSegment.cc
	* src/PiecedSegment.h
	* src/Segment.h
Tatsuhiro Tsujikawa %!s(int64=17) %!d(string=hai) anos
pai
achega
ba158dbfc1
Modificáronse 7 ficheiros con 16 adicións e 6 borrados
  1. 10 0
      ChangeLog
  2. 1 1
      src/GrowSegment.h
  3. 1 1
      src/Piece.cc
  4. 1 1
      src/Piece.h
  5. 1 1
      src/PiecedSegment.cc
  6. 1 1
      src/PiecedSegment.h
  7. 1 1
      src/Segment.h

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+2008-06-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	Made `begin' unsigned int.
+	* src/GrowSegment.h
+	* src/Piece.cc
+	* src/Piece.h
+	* src/PiecedSegment.cc
+	* src/PiecedSegment.h
+	* src/Segment.h
+	
 2008-06-05  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Calculate piece hash when data is arrived if the data is arrived in

+ 1 - 1
src/GrowSegment.h

@@ -92,7 +92,7 @@ public:
 
 #ifdef ENABLE_MESSAGE_DIGEST
 
-  virtual bool updateHash(size_t begin,
+  virtual bool updateHash(uint32_t begin,
 			  const unsigned char* data, size_t dataLength)
   {
     return false;

+ 1 - 1
src/Piece.cc

@@ -225,7 +225,7 @@ void Piece::setHashAlgo(const std::string& algo)
   _hashAlgo = algo;
 }
 
-bool Piece::updateHash(size_t begin, const unsigned char* data, size_t dataLength)
+bool Piece::updateHash(uint32_t begin, const unsigned char* data, size_t dataLength)
 {
   if(_hashAlgo.empty()) {
     return false;

+ 1 - 1
src/Piece.h

@@ -140,7 +140,7 @@ public:
   // Updates hash value. This function compares begin and private variable
   // _nextBegin and only when they are equal, hash is updated eating data and
   // returns true. Otherwise returns false.
-  bool updateHash(size_t begin, const unsigned char* data, size_t dataLength);
+  bool updateHash(uint32_t begin, const unsigned char* data, size_t dataLength);
 
   bool isHashCalculated() const;
 

+ 1 - 1
src/PiecedSegment.cc

@@ -92,7 +92,7 @@ void PiecedSegment::updateWrittenLength(size_t bytes)
 
 #ifdef ENABLE_MESSAGE_DIGEST
 
-bool PiecedSegment::updateHash(size_t begin,
+bool PiecedSegment::updateHash(uint32_t begin,
 			       const unsigned char* data, size_t dataLength)
 {
   return _piece->updateHash(begin, data, dataLength);

+ 1 - 1
src/PiecedSegment.h

@@ -85,7 +85,7 @@ public:
 #ifdef ENABLE_MESSAGE_DIGEST
 
   // `begin' is a offset inside this segment.
-  virtual bool updateHash(size_t begin,
+  virtual bool updateHash(uint32_t begin,
 			  const unsigned char* data, size_t dataLength);
 
   virtual bool isHashCalculated() const;

+ 1 - 1
src/Segment.h

@@ -71,7 +71,7 @@ public:
 #ifdef ENABLE_MESSAGE_DIGEST
 
   // `begin' is a offset inside this segment.
-  virtual bool updateHash(size_t begin,
+  virtual bool updateHash(uint32_t begin,
 			  const unsigned char* data, size_t dataLength) = 0;
 
   virtual bool isHashCalculated() const = 0;