vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Mon Nov 28 13:19:04 2011 +0100| [f0bf352244a1ef2562baffcf42851346d3642e19] | committer: Jean-Baptiste Kempf
dash: Avoid some copies. Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f0bf352244a1ef2562baffcf42851346d3642e19 --- modules/stream_filter/dash/http/HTTPConnection.cpp | 4 ++-- modules/stream_filter/dash/http/HTTPConnection.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/stream_filter/dash/http/HTTPConnection.cpp b/modules/stream_filter/dash/http/HTTPConnection.cpp index 8ca551d..d42aa43 100644 --- a/modules/stream_filter/dash/http/HTTPConnection.cpp +++ b/modules/stream_filter/dash/http/HTTPConnection.cpp @@ -29,7 +29,7 @@ using namespace dash::http; -HTTPConnection::HTTPConnection (std::string url, stream_t *stream) +HTTPConnection::HTTPConnection (const std::string& url, stream_t *stream) { this->url = url; this->stream = stream; @@ -107,7 +107,7 @@ std::string HTTPConnection::readLine () return "\r\n"; } -bool HTTPConnection::sendData (std::string data) +bool HTTPConnection::sendData (const std::string& data) { ssize_t size = net_Write(this->stream, this->httpSocket, NULL, data.c_str(), data.size()); if (size == -1) diff --git a/modules/stream_filter/dash/http/HTTPConnection.h b/modules/stream_filter/dash/http/HTTPConnection.h index fcf6012..7bb4e25 100644 --- a/modules/stream_filter/dash/http/HTTPConnection.h +++ b/modules/stream_filter/dash/http/HTTPConnection.h @@ -48,7 +48,7 @@ namespace dash class HTTPConnection : public IHTTPConnection { public: - HTTPConnection (std::string url, stream_t *stream); + HTTPConnection ( const std::string& url, stream_t *stream ); virtual ~HTTPConnection (); bool init (); @@ -67,7 +67,7 @@ namespace dash stream_t *urlStream; void parseURL (); - bool sendData (std::string data); + bool sendData (const std::string& data); bool parseHeader (); std::string readLine (); }; _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
