mirror of https://github.com/aria2/aria2
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Made string literal to static const std::string * src/BtChokeMessage.cc (toString) * src/BtHaveAllMessage.cc (toString) * src/BtHaveNoneMessage.cc (toString) * src/BtInterestedMessage.cc (toString) * src/BtNotInterestedMessage.cc (toString) * src/BtUnchokeMessage.cc (toString)pull/1/head
parent
386d19693b
commit
5c8db1cc20
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Made string literal to static const std::string
|
||||
* src/BtChokeMessage.cc (toString)
|
||||
* src/BtHaveAllMessage.cc (toString)
|
||||
* src/BtHaveNoneMessage.cc (toString)
|
||||
* src/BtInterestedMessage.cc (toString)
|
||||
* src/BtNotInterestedMessage.cc (toString)
|
||||
* src/BtUnchokeMessage.cc (toString)
|
||||
|
||||
2008-05-13 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Replaced "" with static const variable A2STR::NIL.
|
||||
|
|
|
@ -92,7 +92,8 @@ void BtChokeMessage::onSendComplete() {
|
|||
}
|
||||
|
||||
std::string BtChokeMessage::toString() const {
|
||||
return "choke";
|
||||
static const std::string CHOKE("choke");
|
||||
return CHOKE;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -87,7 +87,8 @@ size_t BtHaveAllMessage::getMessageLength() {
|
|||
}
|
||||
|
||||
std::string BtHaveAllMessage::toString() const {
|
||||
return "have all";
|
||||
static const std::string HAVE_ALL("have all");
|
||||
return HAVE_ALL;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -83,7 +83,8 @@ size_t BtHaveNoneMessage::getMessageLength() {
|
|||
}
|
||||
|
||||
std::string BtHaveNoneMessage::toString() const {
|
||||
return "have none";
|
||||
static const std::string HAVE_NONE("have none");
|
||||
return HAVE_NONE;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -93,7 +93,8 @@ void BtInterestedMessage::onSendComplete() {
|
|||
}
|
||||
|
||||
std::string BtInterestedMessage::toString() const {
|
||||
return "interested";
|
||||
static const std::string INTERESTED("interested");
|
||||
return INTERESTED;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -93,7 +93,8 @@ void BtNotInterestedMessage::onSendComplete() {
|
|||
}
|
||||
|
||||
std::string BtNotInterestedMessage::toString() const {
|
||||
return "not interested";
|
||||
static const std::string NOT_INTERESTED("not interested");
|
||||
return NOT_INTERESTED;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
|
@ -87,7 +87,8 @@ void BtUnchokeMessage::onSendComplete() {
|
|||
}
|
||||
|
||||
std::string BtUnchokeMessage::toString() const {
|
||||
return "unchoke";
|
||||
static const std::string UNCHOKE("unchoke");
|
||||
return UNCHOKE;
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Reference in New Issue