mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-13 06:44:13 +02:00
Time gcc compile fix
This commit is contained in:
@@ -139,15 +139,17 @@ using Poco::DateTime;
|
|||||||
template <>
|
template <>
|
||||||
Var::operator Time () const
|
Var::operator Time () const
|
||||||
{
|
{
|
||||||
if (!_pHolder)
|
VarHolder* pHolder = content();
|
||||||
|
|
||||||
|
if (!pHolder)
|
||||||
throw InvalidAccessException("Can not convert empty value.");
|
throw InvalidAccessException("Can not convert empty value.");
|
||||||
|
|
||||||
if (typeid(Time) == _pHolder->type())
|
if (typeid(Time) == pHolder->type())
|
||||||
return extract<Time>();
|
return extract<Time>();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Poco::DateTime result;
|
Poco::DateTime result;
|
||||||
_pHolder->convert(result);
|
pHolder->convert(result);
|
||||||
return Time(result);
|
return Time(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user