Code style: Declare (Type& value) instead of (Type &value)
diff --git a/ndn-cpp/forwarding-entry.hpp b/ndn-cpp/forwarding-entry.hpp
index 8c652a7..9919f49 100644
--- a/ndn-cpp/forwarding-entry.hpp
+++ b/ndn-cpp/forwarding-entry.hpp
@@ -19,7 +19,7 @@
class ForwardingEntry {
public:
ForwardingEntry
- (const std::string &action, const Name &prefix, const PublisherPublicKeyDigest publisherPublicKeyDigest,
+ (const std::string& action, const Name& prefix, const PublisherPublicKeyDigest publisherPublicKeyDigest,
int faceId, int forwardingFlags, int freshnessSeconds)
: action_(action), prefix_(prefix), publisherPublicKeyDigest_(publisherPublicKeyDigest),
faceId_(faceId), forwardingFlags_(forwardingFlags), freshnessSeconds_(freshnessSeconds)
@@ -31,7 +31,7 @@
{
}
- ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat &wireFormat) const
+ ptr_lib::shared_ptr<std::vector<unsigned char> > wireEncode(WireFormat& wireFormat) const
{
return wireFormat.encodeForwardingEntry(*this);
}
@@ -39,7 +39,7 @@
{
return wireEncode(*WireFormat::getDefaultWireFormat());
}
- void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat &wireFormat)
+ void wireDecode(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat)
{
wireFormat.decodeForwardingEntry(*this, input, inputLength);
}
@@ -47,11 +47,11 @@
{
wireDecode(input, inputLength, *WireFormat::getDefaultWireFormat());
}
- void wireDecode(const std::vector<unsigned char> &input, WireFormat &wireFormat)
+ void wireDecode(const std::vector<unsigned char>& input, WireFormat& wireFormat)
{
wireDecode(&input[0], input.size(), wireFormat);
}
- void wireDecode(const std::vector<unsigned char> &input)
+ void wireDecode(const std::vector<unsigned char>& input)
{
wireDecode(&input[0], input.size());
}
@@ -61,15 +61,15 @@
* WARNING: The resulting pointers in forwardingEntryStruct are invalid after a further use of this object which could reallocate memory.
* @param forwardingEntryStruct a C ndn_ForwardingEntry struct where the prefix name components array is already allocated.
*/
- void get(struct ndn_ForwardingEntry &forwardingEntryStruct) const;
+ void get(struct ndn_ForwardingEntry& forwardingEntryStruct) const;
- const std::string &getAction() const { return action_; }
+ const std::string& getAction() const { return action_; }
- Name &getPrefix() { return prefix_; }
- const Name &getPrefix() const { return prefix_; }
+ Name& getPrefix() { return prefix_; }
+ const Name& getPrefix() const { return prefix_; }
- PublisherPublicKeyDigest &getPublisherPublicKeyDigest() { return publisherPublicKeyDigest_; }
- const PublisherPublicKeyDigest &getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
+ PublisherPublicKeyDigest& getPublisherPublicKeyDigest() { return publisherPublicKeyDigest_; }
+ const PublisherPublicKeyDigest& getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
int getFaceId() const { return faceId_; }
@@ -81,9 +81,9 @@
* Clear this forwarding entry, and set the values by copying from forwardingEntryStruct.
* @param forwardingEntryStruct a C ndn_ForwardingEntry struct.
*/
- void set(const struct ndn_ForwardingEntry &forwardingEntryStruct);
+ void set(const struct ndn_ForwardingEntry& forwardingEntryStruct);
- void setAction(const std::string &value) { action_ = value; }
+ void setAction(const std::string& value) { action_ = value; }
void setFaceId(int value) { faceId_ = value; }