Code style: Declare (Type& value) instead of (Type &value)
diff --git a/ndn-cpp/key.hpp b/ndn-cpp/key.hpp
index 6fa2f05..a3784f6 100644
--- a/ndn-cpp/key.hpp
+++ b/ndn-cpp/key.hpp
@@ -24,26 +24,26 @@
* WARNING: The resulting pointers in keyLocatorStruct are invalid after a further use of this object which could reallocate memory.
* @param keyLocatorStruct a C ndn_KeyLocator struct where the name components array is already allocated.
*/
- void get(struct ndn_KeyLocator &keyLocatorStruct) const;
+ void get(struct ndn_KeyLocator& keyLocatorStruct) const;
/**
* Clear this key locator, and set the values by copying from the ndn_KeyLocator struct.
* @param keyLocatorStruct a C ndn_KeyLocator struct
*/
- void set(const struct ndn_KeyLocator &keyLocatorStruct);
+ void set(const struct ndn_KeyLocator& keyLocatorStruct);
ndn_KeyLocatorType getType() const { return type_; }
- const std::vector<unsigned char> &getKeyData() const { return keyData_; }
+ const std::vector<unsigned char>& getKeyData() const { return keyData_; }
- const Name &getKeyName() const { return keyName_; }
- Name &getKeyName() { return keyName_; }
+ const Name& getKeyName() const { return keyName_; }
+ Name& getKeyName() { return keyName_; }
ndn_KeyNameType getKeyNameType() const { return keyNameType_; }
void setType(ndn_KeyLocatorType type) { type_ = type; }
- void setKeyData(const std::vector<unsigned char> &keyData) { keyData_ = keyData; }
+ void setKeyData(const std::vector<unsigned char>& keyData) { keyData_ = keyData; }
void setKeyData(const unsigned char *keyData, unsigned int keyDataLength)
{
setVector(keyData_, keyData, keyDataLength);
@@ -52,12 +52,12 @@
/**
* @deprecated Use getKeyData().
*/
- const std::vector<unsigned char> &getKeyOrCertificate() const { return getKeyData(); }
+ const std::vector<unsigned char>& getKeyOrCertificate() const { return getKeyData(); }
/**
* @deprecated Use setKeyData.
*/
- void setKeyOrCertificate(const std::vector<unsigned char> &keyData) { setKeyData(keyData); }
+ void setKeyOrCertificate(const std::vector<unsigned char>& keyData) { setKeyData(keyData); }
/**
* @deprecated Use setKeyData.