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; }
       
