diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-11-27 20:46:26 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:29:08 +0300 |
commit | fc2157169402e1667cf40e1de44c77f45928636d (patch) | |
tree | 6e33600fda5c16368e561ef3329d8804fff0a7a1 /indexer/classificator_loader.cpp | |
parent | 2090e10315ed845213811f207067bd4001a74ee2 (diff) |
Use binary styles in production configuration and text styles in all other configurations
Diffstat (limited to 'indexer/classificator_loader.cpp')
-rw-r--r-- | indexer/classificator_loader.cpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/indexer/classificator_loader.cpp b/indexer/classificator_loader.cpp index 6c11be5646..8056597f22 100644 --- a/indexer/classificator_loader.cpp +++ b/indexer/classificator_loader.cpp @@ -55,7 +55,7 @@ namespace classificator void Load() { - LOG(LINFO, ("Reading of classificator started")); + LOG(LDEBUG, ("Reading of classificator started")); Platform & p = GetPlatform(); @@ -66,23 +66,20 @@ namespace classificator //LOG(LINFO, ("Reading of drawing rules")); drule::RulesHolder & rules = drule::rules(); - try - { - // Load from proto buffer binary file. - ReaderStreamBuf buffer(p.GetReader(DRAWING_RULES_BIN_FILE)); +#if defined(OMIM_PRODUCTION) || defined(USE_BINARY_STYLES) + // Load from proto buffer binary file. + ReaderStreamBuf buffer(p.GetReader(DRAWING_RULES_BIN_FILE)); - istream s(&buffer); - rules.LoadFromBinaryProto(s); - } - catch (FileAbsentException const &) - { - // Load from proto buffer text file. - string buffer; - ModelReaderPtr(p.GetReader(DRAWING_RULES_TXT_FILE)).ReadAsString(buffer); + istream s(&buffer); + rules.LoadFromBinaryProto(s); +#else + // Load from proto buffer text file. + string buffer; + ModelReaderPtr(p.GetReader(DRAWING_RULES_TXT_FILE)).ReadAsString(buffer); - rules.LoadFromTextProto(buffer); - } + rules.LoadFromTextProto(buffer); +#endif - LOG(LINFO, ("Reading of classificator finished")); + LOG(LDEBUG, ("Reading of classificator finished")); } } |