diff --git a/indexer/search_index_builder.cpp b/indexer/search_index_builder.cpp index 15887dc8fa..286324b711 100644 --- a/indexer/search_index_builder.cpp +++ b/indexer/search_index_builder.cpp @@ -119,6 +119,8 @@ void indexer::BuildSearchIndex(FeaturesVector const & featuresVector, Writer & w bool indexer::BuildSearchIndexFromDatFile(string const & fName) { + LOG(LINFO, ("Start building search index ...")); + try { Platform & pl = GetPlatform(); @@ -157,5 +159,6 @@ bool indexer::BuildSearchIndexFromDatFile(string const & fName) return false; } + LOG(LINFO, ("End building search index.")); return true; } diff --git a/platform/platform_mac.mm b/platform/platform_mac.mm index 7f2c4c0f0a..7db07c03e8 100644 --- a/platform/platform_mac.mm +++ b/platform/platform_mac.mm @@ -15,6 +15,9 @@ #include #include +#include + + Platform::Platform() { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; @@ -120,7 +123,8 @@ void Platform::RunAsync(TFunctor const & fn, Priority p) int priority = DISPATCH_QUEUE_PRIORITY_DEFAULT; switch (p) { - case EPriorityBackground: priority = DISPATCH_QUEUE_PRIORITY_BACKGROUND; break; + // It seems like this option is not supported in Snow Leopard. + //case EPriorityBackground: priority = DISPATCH_QUEUE_PRIORITY_BACKGROUND; break; case EPriorityDefault: priority = DISPATCH_QUEUE_PRIORITY_DEFAULT; break; case EPriorityHigh: priority = DISPATCH_QUEUE_PRIORITY_HIGH; break; case EPriorityLow: priority = DISPATCH_QUEUE_PRIORITY_LOW; break; 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 {