From 21ddd0a820e14f378ca1c6f3afd8a0e7bb39239f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 12 Jun 2020 11:26:44 +0200 Subject: [PATCH] Postpone initialization of hashmaps. --- server/TracySourceView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/TracySourceView.cpp b/server/TracySourceView.cpp index 0783e611..7928b5f8 100644 --- a/server/TracySourceView.cpp +++ b/server/TracySourceView.cpp @@ -3114,10 +3114,6 @@ static unordered_flat_set G } } -static const auto s_keywords = GetKeywords(); -static const auto s_types = GetTypes(); -static const auto s_special = GetSpecial(); - static bool TokenizeNumber( const char*& begin, const char* end ) { const bool startNum = *begin >= '0' && *begin <= '9'; @@ -3178,6 +3174,10 @@ static bool TokenizeNumber( const char*& begin, const char* end ) SourceView::TokenColor SourceView::IdentifyToken( const char*& begin, const char* end ) { + static const auto s_keywords = GetKeywords(); + static const auto s_types = GetTypes(); + static const auto s_special = GetSpecial(); + if( *begin == '"' ) { begin++;