mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Move function-scope static QThreadStorage objects to namespace scope
to ensure destruction after all function-scope statics and avoid warning "thread exited after QThreadStorage destroyed".
This commit is contained in:
@@ -17,11 +17,12 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
static QThreadStorage<std::vector<const CJsonScope *>> g_stack;
|
||||
|
||||
//! \private
|
||||
auto &jsonStack() noexcept
|
||||
{
|
||||
static QThreadStorage<std::vector<const CJsonScope *>> stack;
|
||||
return stack.localData();
|
||||
return g_stack.localData();
|
||||
}
|
||||
|
||||
// pin vtables to this file
|
||||
|
||||
Reference in New Issue
Block a user