2010-05-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Return const reference.
	* src/DefaultPieceStorage.h
	* src/DownloadContext.h
	* src/FeatureConfig.cc
	* src/FeatureConfig.h
	* src/OptionParser.cc
	* src/OptionParser.h
	* src/SimpleRandomizer.cc
	* src/SimpleRandomizer.h
pull/1/head
Tatsuhiro Tsujikawa 2010-05-08 12:25:28 +00:00
parent 4db77d33ac
commit 7fc6c36370
9 changed files with 20 additions and 8 deletions

View File

@ -1,3 +1,15 @@
2010-05-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Return const reference.
* src/DefaultPieceStorage.h
* src/DownloadContext.h
* src/FeatureConfig.cc
* src/FeatureConfig.h
* src/OptionParser.cc
* src/OptionParser.h
* src/SimpleRandomizer.cc
* src/SimpleRandomizer.h
2010-05-07 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Bump up version number to 1.9.3.

View File

@ -243,7 +243,7 @@ public:
_pieceSelector = pieceSelector;
}
SharedHandle<PieceSelector> getPieceSelector() const
const SharedHandle<PieceSelector>& getPieceSelector() const
{
return _pieceSelector;
}

View File

@ -201,7 +201,7 @@ public:
void setDir(const std::string& dir) { _dir = dir; }
SharedHandle<Signature> getSignature() const { return _signature; }
const SharedHandle<Signature>& getSignature() const { return _signature; }
void setSignature(const SharedHandle<Signature>& signature)
{

View File

@ -120,7 +120,7 @@ FeatureConfig::FeatureConfig() {
_features.insert(vbegin(featureArray), vend(featureArray));
}
SharedHandle<FeatureConfig> FeatureConfig::getInstance()
const SharedHandle<FeatureConfig>& FeatureConfig::getInstance()
{
if(_featureConfig.isNull()) {
_featureConfig.reset(new FeatureConfig());

View File

@ -56,7 +56,7 @@ private:
FeatureConfig();
public:
static SharedHandle<FeatureConfig> getInstance();
static const SharedHandle<FeatureConfig>& getInstance();
uint16_t getDefaultPort(const std::string& protocol) const;

View File

@ -369,7 +369,7 @@ SharedHandle<OptionHandler> OptionParser::findByShortName(char shortName) const
SharedHandle<OptionParser> OptionParser::_optionParser;
SharedHandle<OptionParser> OptionParser::getInstance()
const SharedHandle<OptionParser>& OptionParser::getInstance()
{
if(_optionParser.isNull()) {
_optionParser.reset(new OptionParser());

View File

@ -101,7 +101,7 @@ public:
// Hidden options are not returned.
SharedHandle<OptionHandler> findByShortName(char shortName) const;
static SharedHandle<OptionParser> getInstance();
static const SharedHandle<OptionParser>& getInstance();
};
typedef SharedHandle<OptionParser> OptionParserHandle;

View File

@ -42,7 +42,7 @@ namespace aria2 {
SharedHandle<SimpleRandomizer> SimpleRandomizer::_randomizer;
SharedHandle<SimpleRandomizer> SimpleRandomizer::getInstance()
const SharedHandle<SimpleRandomizer>& SimpleRandomizer::getInstance()
{
if(_randomizer.isNull()) {
_randomizer.reset(new SimpleRandomizer());

View File

@ -46,7 +46,7 @@ private:
SimpleRandomizer();
public:
static SharedHandle<SimpleRandomizer> getInstance();
static const SharedHandle<SimpleRandomizer>& getInstance();
static void init();