fixed: PatternCacher incorrectly rebuilt the cache
some new Ezc::Pattern objects were inserted the storage container is std::map<long,...> but we traverse it as a std::vector e.g.: for(size_t i=0 ; i<pattern_tab.size() ; ++i) RebuildCache(pattern_tab[i].pattern); so eventually new patterns were added to the map (operator []) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@980 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
fb18b2238e
commit
4fda06b547
|
@ -221,10 +221,22 @@ void PatternCacher::RebuildCache(Ezc::Pattern & pattern)
|
||||||
|
|
||||||
void PatternCacher::RebuildCache()
|
void PatternCacher::RebuildCache()
|
||||||
{
|
{
|
||||||
for(size_t i=0 ; i<pattern_tab.size() ; ++i)
|
PatternTab::iterator i = pattern_tab.begin();
|
||||||
RebuildCache(pattern_tab[i].pattern);
|
|
||||||
|
for( ; i != pattern_tab.end() ; ++i)
|
||||||
|
RebuildCache(i->second.pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PatternCacher::ClearCache()
|
||||||
|
{
|
||||||
|
PatternTab::iterator i = pattern_tab.begin();
|
||||||
|
|
||||||
|
for( ; i != pattern_tab.end() ; ++i)
|
||||||
|
i->second.pattern.ClearCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Winix
|
} // namespace Winix
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,9 @@ public:
|
||||||
// rebuild cache in all patterns
|
// rebuild cache in all patterns
|
||||||
void RebuildCache();
|
void RebuildCache();
|
||||||
|
|
||||||
|
// clearing all pointers to functions and blocks
|
||||||
|
void ClearCache();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -844,10 +844,8 @@ using namespace TemplatesFunctions;
|
||||||
patterns.Clear();
|
patterns.Clear();
|
||||||
index_patterns.Clear();
|
index_patterns.Clear();
|
||||||
change_patterns.Clear();
|
change_patterns.Clear();
|
||||||
|
pattern_cacher.ClearCache();
|
||||||
ezc_blocks.Clear();
|
ezc_blocks.Clear();
|
||||||
|
|
||||||
//a pattern cacher chyba tez powinien byc wyczyszczony (tylko tam jest jakies zabezpieczenie)
|
|
||||||
//bo moze miec skeszowane bloki....
|
|
||||||
|
|
||||||
pat_index = patterns.Add(config->templates_index);
|
pat_index = patterns.Add(config->templates_index);
|
||||||
pat_index_fullscreen = patterns.Add(L"index_fullscreen.html"); // !! IMPROVE ME name to the config
|
pat_index_fullscreen = patterns.Add(L"index_fullscreen.html"); // !! IMPROVE ME name to the config
|
||||||
|
|
Loading…
Reference in New Issue