mirror of https://github.com/aria2/aria2
Remove Append and StringAppend
parent
6a976a4118
commit
88580da587
|
@ -177,23 +177,6 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
class Append {
|
|
||||||
private:
|
|
||||||
T& to_;
|
|
||||||
T delim_;
|
|
||||||
public:
|
|
||||||
template<typename S>
|
|
||||||
Append(T& to, const S& delim):to_(to), delim_(delim) {}
|
|
||||||
|
|
||||||
template<typename S>
|
|
||||||
void operator()(const S& s) {
|
|
||||||
to_ += s+delim_;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef Append<std::string> StringAppend;
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class auto_delete {
|
class auto_delete {
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -79,11 +79,7 @@ void FeatureConfigTest::testFeatureSummary() {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string featuresString;
|
std::string featuresString = strjoin(vbegin(features), vend(features), ", ");
|
||||||
std::for_each(vbegin(features), vend(features),
|
|
||||||
StringAppend(featuresString, ", "));
|
|
||||||
featuresString = util::strip(featuresString, ", ");
|
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(featuresString, featureSummary());
|
CPPUNIT_ASSERT_EQUAL(featuresString, featureSummary());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue