optimize the common case

Thu, 04 Jul 2013 03:30:39 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 04 Jul 2013 03:30:39 +0300
changeset 325
f16a8f22b5c1
parent 324
31c6e53e1e4e
child 326
469bf1fe26e8

optimize the common case

src/msglog.cpp file | annotate | diff | comparison | revisions
--- a/src/msglog.cpp	Thu Jul 04 03:29:51 2013 +0300
+++ b/src/msglog.cpp	Thu Jul 04 03:30:39 2013 +0300
@@ -84,6 +84,9 @@
 
 void MessageManager::tick()
 {
+	if( m_lines.size() == 0 )
+		return;
+	
 	bool changed = false;
 	
 	for( uint i = 0; i < m_lines.size(); ++i )

mercurial