mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 18:45:10 +01:00
LOB gcc compile fix
This commit is contained in:
parent
317fd37d2b
commit
f09e1820cd
@ -53,15 +53,17 @@ using Poco::Data::BLOB;
|
||||
template <>
|
||||
Var::operator CLOB () const
|
||||
{
|
||||
if (!_pHolder)
|
||||
VarHolder* pHolder = content();
|
||||
|
||||
if (!pHolder)
|
||||
throw InvalidAccessException("Can not convert empty value.");
|
||||
|
||||
if (typeid(CLOB) == _pHolder->type())
|
||||
if (typeid(CLOB) == pHolder->type())
|
||||
return extract<CLOB>();
|
||||
else
|
||||
{
|
||||
std::string result;
|
||||
_pHolder->convert(result);
|
||||
pHolder->convert(result);
|
||||
return CLOB(result);
|
||||
}
|
||||
}
|
||||
@ -70,15 +72,17 @@ Var::operator CLOB () const
|
||||
template <>
|
||||
Var::operator BLOB () const
|
||||
{
|
||||
if (!_pHolder)
|
||||
VarHolder* pHolder = content();
|
||||
|
||||
if (!pHolder)
|
||||
throw InvalidAccessException("Can not convert empty value.");
|
||||
|
||||
if (typeid(BLOB) == _pHolder->type())
|
||||
if (typeid(BLOB) == pHolder->type())
|
||||
return extract<BLOB>();
|
||||
else
|
||||
{
|
||||
std::string result;
|
||||
_pHolder->convert(result);
|
||||
pHolder->convert(result);
|
||||
return BLOB(reinterpret_cast<const unsigned char*>(result.data()),
|
||||
result.size());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user