diff options
author | vng <viktor.govako@gmail.com> | 2011-12-29 01:18:04 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:31:03 +0300 |
commit | 29a245c35561c3808cbafa11448225c2fafb6517 (patch) | |
tree | 533e2b70fad3cce082752edcd91746b786766acd /storage | |
parent | 4446f0cc0e76d887dddae9aaf685ab018398c31a (diff) |
[search] Build in index generation in thread.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp index 889cf4acb9..1348c9c238 100644 --- a/storage/storage.cpp +++ b/storage/storage.cpp @@ -356,8 +356,9 @@ namespace storage file = file.substr(i+1); // Generate search index if it's supported in this build - if (GetPlatform().IsFeatureSupported("search")) - GetPlatform().RunAsync(bind(&Storage::GenerateSearchIndex, this, cref(file))); + Platform & pl = GetPlatform(); + if (pl.IsFeatureSupported("search")) + pl.RunAsync(bind(&Storage::GenerateSearchIndex, this, file)); else // Or simply activate downloaded map UpdateAfterSearchIndex(file); } @@ -369,7 +370,7 @@ namespace storage { if (indexer::BuildSearchIndexFromDatFile(fName)) { - GetPlatform().RunOnGuiThread(bind(&Storage::UpdateAfterSearchIndex, this, cref(fName))); + GetPlatform().RunOnGuiThread(bind(&Storage::UpdateAfterSearchIndex, this, fName)); } else { |