@@ -605,7 +605,9 @@ class ProfilerGraph
605
605
void draw (s32 x_left, s32 y_bottom, video::IVideoDriver *driver,
606
606
gui::IGUIFont *font) const
607
607
{
608
- UNORDERED_MAP<std::string, Meta> m_meta;
608
+ // Do *not* use UNORDERED_MAP here as the order needs
609
+ // to be the same for each call to prevent flickering
610
+ std::map<std::string, Meta> m_meta;
609
611
610
612
for (std::deque<Piece>::const_iterator k = m_log.begin ();
611
613
k != m_log.end (); ++k) {
@@ -615,7 +617,7 @@ class ProfilerGraph
615
617
i != piece.values .end (); ++i) {
616
618
const std::string &id = i->first ;
617
619
const float &value = i->second ;
618
- UNORDERED_MAP <std::string, Meta>::iterator j = m_meta.find (id);
620
+ std::map <std::string, Meta>::iterator j = m_meta.find (id);
619
621
620
622
if (j == m_meta.end ()) {
621
623
m_meta[id] = Meta (value);
@@ -642,7 +644,7 @@ class ProfilerGraph
642
644
sizeof (usable_colors) / sizeof (*usable_colors);
643
645
u32 next_color_i = 0 ;
644
646
645
- for (UNORDERED_MAP <std::string, Meta>::iterator i = m_meta.begin ();
647
+ for (std::map <std::string, Meta>::iterator i = m_meta.begin ();
646
648
i != m_meta.end (); ++i) {
647
649
Meta &meta = i->second ;
648
650
video::SColor color (255 , 200 , 200 , 200 );
@@ -658,7 +660,7 @@ class ProfilerGraph
658
660
s32 textx2 = textx + 200 - 15 ;
659
661
s32 meta_i = 0 ;
660
662
661
- for (UNORDERED_MAP <std::string, Meta>::const_iterator i = m_meta.begin ();
663
+ for (std::map <std::string, Meta>::const_iterator i = m_meta.begin ();
662
664
i != m_meta.end (); ++i) {
663
665
const std::string &id = i->first ;
664
666
const Meta &meta = i->second ;
0 commit comments