Cosmetic change

pull/43/head
Tatsuhiro Tsujikawa 2013-01-15 21:57:35 +09:00
parent 88580da587
commit df0be5e7f0
1 changed files with 11 additions and 6 deletions

View File

@ -54,14 +54,19 @@ uint16_t getDefaultPort(const std::string& protocol)
std::string featureSummary()
{
std::string s;
for(int i = 0; i < MAX_FEATURE; ++i) {
const char* name = strSupportedFeature(i);
if(name) {
s += name;
s += ", ";
int first;
for(first = 0; first < MAX_FEATURE && !strSupportedFeature(first); ++first);
if(first < MAX_FEATURE) {
s += strSupportedFeature(first);
for(int i = first+1; i < MAX_FEATURE; ++i) {
const char* name = strSupportedFeature(i);
if(name) {
s += ", ";
s += name;
}
}
}
return util::strip(s, ", ");
return s;
}
const char* strSupportedFeature(int feature)