summaryrefslogtreecommitdiff
path: root/src/RangeBtMessage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/RangeBtMessage.h')
-rw-r--r--src/RangeBtMessage.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/RangeBtMessage.h b/src/RangeBtMessage.h
index 0da6c557..c2a0d1d0 100644
--- a/src/RangeBtMessage.h
+++ b/src/RangeBtMessage.h
@@ -47,10 +47,10 @@ private:
int32_t length_;
static const size_t MESSAGE_LENGTH = 17;
+
protected:
- template<typename T>
- static std::unique_ptr<T> create(const unsigned char* data,
- size_t dataLength)
+ template <typename T>
+ static std::unique_ptr<T> create(const unsigned char* data, size_t dataLength)
{
bittorrent::assertPayloadLengthEqual(13, dataLength, T::NAME);
bittorrent::assertID(T::ID, data, T::NAME);
@@ -58,9 +58,10 @@ protected:
bittorrent::getIntParam(data, 5),
bittorrent::getIntParam(data, 9));
}
+
public:
- RangeBtMessage(uint8_t id, const char* name,
- size_t index, int32_t begin, int32_t length);
+ RangeBtMessage(uint8_t id, const char* name, size_t index, int32_t begin,
+ int32_t length);
size_t getIndex() const { return index_; }