diff options
author | vng <viktor.govako@gmail.com> | 2012-09-11 17:13:38 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:43:16 +0300 |
commit | cd68512942038abc5d57300b9e37d4234b33cb98 (patch) | |
tree | 557cfae96dcd098299c0d957f08c27f2208248e9 /search | |
parent | fd1bc3cb18553e7e849b12ae03e0388cdc18fa21 (diff) |
Workaround for iOS GCC mysterious bug in Release.
Diffstat (limited to 'search')
-rw-r--r-- | search/feature_offset_match.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/search/feature_offset_match.hpp b/search/feature_offset_match.hpp index 7f7d0f5f7f..28b1633f9b 100644 --- a/search/feature_offset_match.hpp +++ b/search/feature_offset_match.hpp @@ -6,7 +6,7 @@ #include "../base/string_utils.hpp" #include "../base/stl_add.hpp" #include "../base/scope_guard.hpp" -//#include "../base/logging.hpp" +#include "../base/mutex.hpp" #include "../std/algorithm.hpp" #include "../std/scoped_ptr.hpp" @@ -110,6 +110,10 @@ void FullMatchInTrie(TrieIterator const & trieRoot, if (!pIter || !bFullEdgeMatched || symbolsMatched != s.size()) return; + // Here is the dummy mutex to avoid mysterious iOS GCC-LLVM bug here. + static threads::Mutex dummyM; + threads::MutexGuard dummyG(dummyM); + ASSERT_EQUAL ( symbolsMatched, s.size(), () ); for (size_t i = 0; i < pIter->m_value.size(); ++i) f(pIter->m_value[i]); |