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 @@
using namespace dash::http;
Chunk::Chunk() : url()
{
startByte = endByte = 0;
}
Chunk::~Chunk()
Chunk::Chunk() : startByte( 0 ),
endByte( 0 )
{
}
int Chunk::getEndByte ()
int Chunk::getEndByte () const
{
return endByte;
}
int Chunk::getStartByte ()
int Chunk::getStartByte () const
{
return startByte;
}
std::string Chunk::getUrl ()
const std::string& Chunk::getUrl () const
{
return url;
}
......@@ -58,7 +55,7 @@ void Chunk::setStartByte (int startByte)
{
this->startByte = startByte;
}
void Chunk::setUrl (std::string url)
void Chunk::setUrl ( const std::string& url )
{
this->url = url;
}
......@@ -36,14 +36,13 @@ namespace dash
{
public:
Chunk ();
virtual ~Chunk ();
int getEndByte ();
int getStartByte ();
std::string getUrl ();
int getEndByte () const;
int getStartByte () const;
const std::string& getUrl () const;
void setEndByte (int endByte);
void setStartByte (int startByte);
void setUrl (std::string url);
void setUrl (const std::string& url);
private:
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