mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-13 10:32:57 +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)
|
||||
{
|
||||
#ifdef POCO_COMPILER_CLANG
|
||||
sqlite3* p = 0; Any a = p; // ??? clang fails to AnyCast without these ???
|
||||
#endif
|
||||
return AnyCast<sqlite3*>(session.getProperty("handle"));
|
||||
return reinterpret_cast<sqlite3*>(AnyCast<void*>(session.getProperty("handle")));
|
||||
}
|
||||
|
||||
|
||||
|
@ -118,7 +118,7 @@ bool Extractor::extract(std::size_t pos, std::string& val)
|
||||
if (!pBuf)
|
||||
val.clear();
|
||||
else
|
||||
val = std::string(pBuf);
|
||||
val.assign(pBuf);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ SessionImpl::SessionImpl(const std::string& fileName, std::size_t loginTimeout):
|
||||
{
|
||||
open();
|
||||
setConnectionTimeout(CONNECTION_TIMEOUT_DEFAULT);
|
||||
setProperty("handle", _pDB);
|
||||
setProperty("handle", static_cast<void*>(_pDB));
|
||||
addFeature("autoCommit",
|
||||
&SessionImpl::autoCommit,
|
||||
&SessionImpl::isAutoCommit);
|
||||
|
Loading…
Reference in New Issue
Block a user