mirror of https://github.com/aria2/aria2
2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Return const reference. * src/DownloadHandlerConstants.cc * src/DownloadHandlerConstants.h (getMetalinkExtensions) (getMetalinkContentTypes) (getBtExtensions) (getBtContentTypes)pull/1/head
parent
7235f2657f
commit
e59f4f2fe3
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Return const reference.
|
||||
* src/DownloadHandlerConstants.cc
|
||||
* src/DownloadHandlerConstants.h
|
||||
(getMetalinkExtensions)
|
||||
(getMetalinkContentTypes)
|
||||
(getBtExtensions)
|
||||
(getBtContentTypes)
|
||||
|
||||
2008-05-18 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
* src/HttpHeader.cc (get): Rewritten.
|
||||
|
|
|
@ -49,28 +49,36 @@ const char* DownloadHandlerConstants::BT_CONTENT_TYPES[] = {
|
|||
"application/x-bittorrent"
|
||||
};
|
||||
|
||||
std::deque<std::string> DownloadHandlerConstants::getMetalinkExtensions()
|
||||
const std::deque<std::string>& DownloadHandlerConstants::getMetalinkExtensions()
|
||||
{
|
||||
return std::deque<std::string>(&METALINK_EXTENSIONS[0],
|
||||
static const std::deque<std::string> l
|
||||
(&METALINK_EXTENSIONS[0],
|
||||
&METALINK_EXTENSIONS[arrayLength(METALINK_EXTENSIONS)]);
|
||||
return l;
|
||||
}
|
||||
|
||||
std::deque<std::string> DownloadHandlerConstants::getMetalinkContentTypes()
|
||||
const std::deque<std::string>& DownloadHandlerConstants::getMetalinkContentTypes()
|
||||
{
|
||||
return std::deque<std::string>(&METALINK_CONTENT_TYPES[0],
|
||||
static const std::deque<std::string> l
|
||||
(&METALINK_CONTENT_TYPES[0],
|
||||
&METALINK_CONTENT_TYPES[arrayLength(METALINK_CONTENT_TYPES)]);
|
||||
return l;
|
||||
}
|
||||
|
||||
std::deque<std::string> DownloadHandlerConstants::getBtExtensions()
|
||||
const std::deque<std::string>& DownloadHandlerConstants::getBtExtensions()
|
||||
{
|
||||
return std::deque<std::string>(&BT_EXTENSIONS[0],
|
||||
static const std::deque<std::string> l
|
||||
(&BT_EXTENSIONS[0],
|
||||
&BT_EXTENSIONS[arrayLength(BT_EXTENSIONS)]);
|
||||
return l;
|
||||
}
|
||||
|
||||
std::deque<std::string> DownloadHandlerConstants::getBtContentTypes()
|
||||
const std::deque<std::string>& DownloadHandlerConstants::getBtContentTypes()
|
||||
{
|
||||
return std::deque<std::string>(&BT_CONTENT_TYPES[0],
|
||||
static const std::deque<std::string> l
|
||||
(&BT_CONTENT_TYPES[0],
|
||||
&BT_CONTENT_TYPES[arrayLength(BT_CONTENT_TYPES)]);
|
||||
return l;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -46,19 +46,19 @@ class DownloadHandlerConstants
|
|||
public:
|
||||
static const char* METALINK_EXTENSIONS[];
|
||||
|
||||
static std::deque<std::string> getMetalinkExtensions();
|
||||
static const std::deque<std::string>& getMetalinkExtensions();
|
||||
|
||||
static const char* METALINK_CONTENT_TYPES[];
|
||||
|
||||
static std::deque<std::string> getMetalinkContentTypes();
|
||||
static const std::deque<std::string>& getMetalinkContentTypes();
|
||||
|
||||
static const char* BT_EXTENSIONS[];
|
||||
|
||||
static std::deque<std::string> getBtExtensions();
|
||||
static const std::deque<std::string>& getBtExtensions();
|
||||
|
||||
static const char* BT_CONTENT_TYPES[];
|
||||
|
||||
static std::deque<std::string> getBtContentTypes();
|
||||
static const std::deque<std::string>& getBtContentTypes();
|
||||
};
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Reference in New Issue