Commit f4600d0e authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen Committed by Jean-Baptiste Kempf

dash: Chunk: Avoiding copies + cosmetics

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8c55fe50
...@@ -29,24 +29,21 @@ ...@@ -29,24 +29,21 @@
using namespace dash::http; using namespace dash::http;
Chunk::Chunk() : url() Chunk::Chunk() : startByte( 0 ),
endByte( 0 )
{
startByte = endByte = 0;
}
Chunk::~Chunk()
{ {
} }
int Chunk::getEndByte () int Chunk::getEndByte () const
{ {
return endByte; return endByte;
} }
int Chunk::getStartByte () int Chunk::getStartByte () const
{ {
return startByte; return startByte;
} }
std::string Chunk::getUrl ()
const std::string& Chunk::getUrl () const
{ {
return url; return url;
} }
...@@ -58,7 +55,7 @@ void Chunk::setStartByte (int startByte) ...@@ -58,7 +55,7 @@ void Chunk::setStartByte (int startByte)
{ {
this->startByte = startByte; this->startByte = startByte;
} }
void Chunk::setUrl (std::string url) void Chunk::setUrl ( const std::string& url )
{ {
this->url = url; this->url = url;
} }
...@@ -36,14 +36,13 @@ namespace dash ...@@ -36,14 +36,13 @@ namespace dash
{ {
public: public:
Chunk (); Chunk ();
virtual ~Chunk ();
int getEndByte (); int getEndByte () const;
int getStartByte (); int getStartByte () const;
std::string getUrl (); const std::string& getUrl () const;
void setEndByte (int endByte); void setEndByte (int endByte);
void setStartByte (int startByte); void setStartByte (int startByte);
void setUrl (std::string url); void setUrl (const std::string& url);
private: private:
std::string url; std::string url;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment