summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-12 21:27:24 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-11-12 21:27:24 +0900
commitdb5cc4db27c0495873c42dbac224ce599b970570 (patch)
tree613ff47bafeb779595fec8cd389e9275146864dd /src/DownloadEngine.cc
parent5347efb9678c792b38e8525768be92573c663647 (diff)
Don't append character to std::string.
Diffstat (limited to 'src/DownloadEngine.cc')
-rw-r--r--src/DownloadEngine.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/DownloadEngine.cc b/src/DownloadEngine.cc
index 9393857f..03250d6c 100644
--- a/src/DownloadEngine.cc
+++ b/src/DownloadEngine.cc
@@ -311,16 +311,12 @@ std::string createSockPoolKey
std::string key;
if(!username.empty()) {
key += util::percentEncode(username);
- key += '@';
+ key += "@";
}
key += host;
- key += A2STR::COLON_C;
- key += util::uitos(port);
+ key += fmt(":%u", port);
if(!proxyhost.empty()) {
- key += A2STR::SLASH_C;
- key += proxyhost;
- key += A2STR::COLON_C;
- key += util::uitos(proxyport);
+ key += fmt("/%s:%u", proxyhost.c_str(), proxyport);
}
return key;
}