Code style: Declare (Type& value) instead of (Type &value)
diff --git a/ndn-cpp/transport/tcp-transport.cpp b/ndn-cpp/transport/tcp-transport.cpp
index 7c55d04..8d6810b 100644
--- a/ndn-cpp/transport/tcp-transport.cpp
+++ b/ndn-cpp/transport/tcp-transport.cpp
@@ -16,9 +16,9 @@
{
}
-void TcpTransport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener)
+void TcpTransport::connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener)
{
- const TcpTransport::ConnectionInfo &tcpConnectionInfo = dynamic_cast<const TcpTransport::ConnectionInfo &>(connectionInfo);
+ const TcpTransport::ConnectionInfo& tcpConnectionInfo = dynamic_cast<const TcpTransport::ConnectionInfo&>(connectionInfo);
ndn_Error error;
if ((error = ndn_TcpTransport_connect(&transport_, (char *)tcpConnectionInfo.getHost().c_str(), tcpConnectionInfo.getPort())))
diff --git a/ndn-cpp/transport/tcp-transport.hpp b/ndn-cpp/transport/tcp-transport.hpp
index b9c12bb..a13a1da 100644
--- a/ndn-cpp/transport/tcp-transport.hpp
+++ b/ndn-cpp/transport/tcp-transport.hpp
@@ -34,7 +34,7 @@
* Get the host given to the constructor.
* @return A string reference for the host.
*/
- const std::string &getHost() const { return host_; }
+ const std::string& getHost() const { return host_; }
/**
* Get the port given to the constructor.
@@ -61,7 +61,7 @@
* @param connectionInfo A reference to a TcpTransport::ConnectionInfo.
* @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
*/
- virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener);
+ virtual void connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
/**
* Set data to the host
diff --git a/ndn-cpp/transport/transport.cpp b/ndn-cpp/transport/transport.cpp
index 1636e4e..ad76dc2 100644
--- a/ndn-cpp/transport/transport.cpp
+++ b/ndn-cpp/transport/transport.cpp
@@ -14,7 +14,7 @@
{
}
-void Transport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener)
+void Transport::connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener)
{
throw logic_error("unimplemented");
}
diff --git a/ndn-cpp/transport/transport.hpp b/ndn-cpp/transport/transport.hpp
index b27039a..2e78b6e 100644
--- a/ndn-cpp/transport/transport.hpp
+++ b/ndn-cpp/transport/transport.hpp
@@ -27,7 +27,7 @@
* @param connectionInfo A reference to an object of a subclass of ConnectionInfo.
* @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
*/
- virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener);
+ virtual void connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
/**
* Set data to the host
@@ -36,7 +36,7 @@
*/
virtual void send(const unsigned char *data, unsigned int dataLength);
- void send(const std::vector<unsigned char> &data)
+ void send(const std::vector<unsigned char>& data)
{
send(&data[0], data.size());
}
diff --git a/ndn-cpp/transport/udp-transport.cpp b/ndn-cpp/transport/udp-transport.cpp
index e877a1f..2ac010a 100644
--- a/ndn-cpp/transport/udp-transport.cpp
+++ b/ndn-cpp/transport/udp-transport.cpp
@@ -16,9 +16,9 @@
{
}
-void UdpTransport::connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener)
+void UdpTransport::connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener)
{
- const UdpTransport::ConnectionInfo &udpConnectionInfo = dynamic_cast<const UdpTransport::ConnectionInfo &>(connectionInfo);
+ const UdpTransport::ConnectionInfo& udpConnectionInfo = dynamic_cast<const UdpTransport::ConnectionInfo&>(connectionInfo);
ndn_Error error;
if ((error = ndn_UdpTransport_connect(&transport_, (char *)udpConnectionInfo.getHost().c_str(), udpConnectionInfo.getPort())))
diff --git a/ndn-cpp/transport/udp-transport.hpp b/ndn-cpp/transport/udp-transport.hpp
index 3df6f93..3004088 100644
--- a/ndn-cpp/transport/udp-transport.hpp
+++ b/ndn-cpp/transport/udp-transport.hpp
@@ -34,7 +34,7 @@
* Get the host given to the constructor.
* @return A string reference for the host.
*/
- const std::string &getHost() const { return host_; }
+ const std::string& getHost() const { return host_; }
/**
* Get the port given to the constructor.
@@ -61,7 +61,7 @@
* @param connectionInfo A reference to a TcpTransport::ConnectionInfo.
* @param elementListener Not a shared_ptr because we assume that it will remain valid during the life of this object.
*/
- virtual void connect(const Transport::ConnectionInfo &connectionInfo, ElementListener &elementListener);
+ virtual void connect(const Transport::ConnectionInfo& connectionInfo, ElementListener& elementListener);
/**
* Set data to the host