mirror of https://github.com/aria2/aria2
parent
d8948056b3
commit
4d8c17d104
|
@ -332,19 +332,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename VPtr>
|
template<typename T, typename VPtr>
|
||||||
const T* downcast(const VPtr& v)
|
T* downcast(const VPtr& v)
|
||||||
{
|
|
||||||
if(v) {
|
|
||||||
DowncastValueBaseVisitor<T> visitor;
|
|
||||||
v->accept(visitor);
|
|
||||||
return visitor.getResult();
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename T, typename VPtr>
|
|
||||||
T* downcast(VPtr& v)
|
|
||||||
{
|
{
|
||||||
if(v) {
|
if(v) {
|
||||||
DowncastValueBaseVisitor<T> visitor;
|
DowncastValueBaseVisitor<T> visitor;
|
||||||
|
|
Loading…
Reference in New Issue