mirror of https://github.com/aria2/aria2
2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Rewritten Accept-Features handling. * src/HttpRequestCommand.cc (createHttpRequest) * src/a2functional.hpull/1/head
parent
fac64b9e07
commit
7ea0e831d4
|
@ -2,6 +2,7 @@
|
|||
|
||||
Rewritten Accept-Features handling.
|
||||
* src/HttpRequestCommand.cc (createHttpRequest)
|
||||
* src/a2functional.h
|
||||
|
||||
2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
|
|
|
@ -159,6 +159,23 @@ 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;
|
||||
|
||||
} // namespace aria2
|
||||
|
||||
#endif // _D_A2_FUNCTIONAL_H_
|
||||
|
|
Loading…
Reference in New Issue