From f07884602a4df09a7c8008e8042ab935fd79514c Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 21 Apr 2017 13:13:29 -0700 Subject: [PATCH] more CR feedback --- libraries/networking/src/ReceivedMessage.h | 2 +- libraries/networking/src/ResourceCache.h | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/networking/src/ReceivedMessage.h b/libraries/networking/src/ReceivedMessage.h index 4787c849a2..414d9fee52 100644 --- a/libraries/networking/src/ReceivedMessage.h +++ b/libraries/networking/src/ReceivedMessage.h @@ -50,7 +50,7 @@ public: qint64 getBytesLeftToRead() const { return _data.size() - _position; } - udt::Packet::MessageNumber getMessageNumber() const { return _messageNumber; } + const udt::Packet::MessageNumber& getMessageNumber() const { return _messageNumber; } void seek(qint64 position) { _position = position; } diff --git a/libraries/networking/src/ResourceCache.h b/libraries/networking/src/ResourceCache.h index 8531560d99..1c586d53f6 100644 --- a/libraries/networking/src/ResourceCache.h +++ b/libraries/networking/src/ResourceCache.h @@ -395,8 +395,8 @@ public: const QUrl& getURL() const { return _url; } - int getDownloadAttempts() { return _attempts; } - int getDownloadAttemptsRemaining() { return _attemptsRemaining; } + unsigned int getDownloadAttempts() { return _attempts; } + unsigned int getDownloadAttemptsRemaining() { return _attemptsRemaining; } signals: /// Fired when the resource begins downloading. @@ -476,11 +476,11 @@ private: qint64 _bytesReceived{ 0 }; qint64 _bytesTotal{ 0 }; qint64 _bytes{ 0 }; - int _attempts{ 0 }; + unsigned int _attempts{ 0 }; - const int MAX_ATTEMPTS = 8; + static const int MAX_ATTEMPTS = 8; - int _attemptsRemaining { MAX_ATTEMPTS }; + unsigned int _attemptsRemaining { MAX_ATTEMPTS }; bool _isInScript{ false }; };