X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fgltrace_state.cpp;h=68bda100354db46025c678618d3d66f2a9d6749e;hb=65ba497caca56134f9b4f18658d104ce89092c11;hp=023d09e3e32d5bcd859a199349caf488ffe9249c;hpb=beba02cddc397ada3f7b8e0fcf6ab09b24f46a49;p=apitrace diff --git a/wrappers/gltrace_state.cpp b/wrappers/gltrace_state.cpp index 023d09e..68bda10 100644 --- a/wrappers/gltrace_state.cpp +++ b/wrappers/gltrace_state.cpp @@ -57,15 +57,13 @@ public: } }; -static os::thread_specific_ptr thread_state; +static thread_specific ThreadState *thread_state; static ThreadState *get_ts(void) { - ThreadState *ts = thread_state.get(); - + ThreadState *ts = thread_state; if (!ts) { - ts = new ThreadState; - thread_state.reset(ts); + thread_state = ts = new ThreadState; } return ts;