mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-21 02:00:33 +01:00
minor performance improvement, better workaround for clang issue with handle property
This commit is contained in:
parent
8d14b92b65
commit
835845422c
@ -223,10 +223,7 @@ private:
|
|||||||
|
|
||||||
inline sqlite3* Utility::dbHandle(const Session& session)
|
inline sqlite3* Utility::dbHandle(const Session& session)
|
||||||
{
|
{
|
||||||
#ifdef POCO_COMPILER_CLANG
|
return reinterpret_cast<sqlite3*>(AnyCast<void*>(session.getProperty("handle")));
|
||||||
sqlite3* p = 0; Any a = p; // ??? clang fails to AnyCast without these ???
|
|
||||||
#endif
|
|
||||||
return AnyCast<sqlite3*>(session.getProperty("handle"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ bool Extractor::extract(std::size_t pos, std::string& val)
|
|||||||
if (!pBuf)
|
if (!pBuf)
|
||||||
val.clear();
|
val.clear();
|
||||||
else
|
else
|
||||||
val = std::string(pBuf);
|
val.assign(pBuf);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ SessionImpl::SessionImpl(const std::string& fileName, std::size_t loginTimeout):
|
|||||||
{
|
{
|
||||||
open();
|
open();
|
||||||
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
|
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
|
||||||
setProperty("handle", _pDB);
|
setProperty("handle", static_cast<void*>(_pDB));
|
||||||
addFeature("autoCommit",
|
addFeature("autoCommit",
|
||||||
&SessionImpl::autoCommit,
|
&SessionImpl::autoCommit,
|
||||||
&SessionImpl::isAutoCommit);
|
&SessionImpl::isAutoCommit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user