mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 09:16:53 +08:00
Update for C++11 features
This commit is contained in:
parent
12bd5b0af5
commit
d04960bc4a
@ -72,10 +72,6 @@ namespace chaiscript
|
|||||||
class Thread_Storage
|
class Thread_Storage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~Thread_Storage()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
inline T *operator->() const
|
inline T *operator->() const
|
||||||
{
|
{
|
||||||
return get_tls().get();
|
return get_tls().get();
|
||||||
@ -92,7 +88,7 @@ namespace chaiscript
|
|||||||
{
|
{
|
||||||
unique_lock<mutex> lock(m_mutex);
|
unique_lock<mutex> lock(m_mutex);
|
||||||
|
|
||||||
typename std::map<std::thread::id, std::shared_ptr<T> >::iterator itr = m_instances.find(std::this_thread::get_id());
|
auto itr = m_instances.find(std::this_thread::get_id());
|
||||||
|
|
||||||
if (itr != m_instances.end()) { return itr->second; }
|
if (itr != m_instances.end()) { return itr->second; }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user