From 0a19686b513d9d35a44c302fb4b0c04cf1853d15 Mon Sep 17 00:00:00 2001 From: vsonnier Date: Wed, 5 Apr 2017 19:28:18 +0200 Subject: [PATCH] Remove 'threadlocal' pedantic and very limited usage that is not supported on all platforms --- src/util/GLFont.cpp | 5 ----- src/visual/PrimaryGLContext.cpp | 6 +----- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/util/GLFont.cpp b/src/util/GLFont.cpp index e3e7e5f..5acf124 100644 --- a/src/util/GLFont.cpp +++ b/src/util/GLFont.cpp @@ -633,12 +633,7 @@ void GLFont::drawString(const std::wstring& str, int pxHeight, float xpos, float void GLFont::drawString(const std::string& str, int pxHeight, float xpos, float ypos, Align hAlign, Align vAlign, int vpx, int vpy, bool cacheable) { //Displayed string is wstring, so use wxString to do the heavy lifting of converting str... -#ifdef WIN32 - //try to reuse the memory with thread_local, unsupported on OSX ? - static thread_local wxString wsTmp; -#else wxString wsTmp; -#endif wsTmp.assign(str); diff --git a/src/visual/PrimaryGLContext.cpp b/src/visual/PrimaryGLContext.cpp index 510aa79..72f0be5 100644 --- a/src/visual/PrimaryGLContext.cpp +++ b/src/visual/PrimaryGLContext.cpp @@ -359,12 +359,8 @@ void PrimaryGLContext::DrawDemod(DemodulatorInstance *demod, RGBA4f color, long GLFont::Align demodAlign = GLFont::GLFONT_ALIGN_CENTER; //Displayed string is wstring, so use wxString to do the heavy lifting of converting getDemodulatorType()... -#ifdef WIN32 - //try to reuse the memory with thread_local, unsupported on OSX ? - static thread_local wxString demodStr; -#else wxString demodStr; -#endif + demodStr.assign(demod->getDemodulatorType()); demodAlign = GLFont::GLFONT_ALIGN_CENTER;