gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r11703: I don't think we'll ever hav


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r11703: I don't think we'll ever have NULL objects in a DisplayList, so turn a condition about that into an assertion checking
Date: Wed, 16 Dec 2009 21:29:37 +0100
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 11703
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2009-12-16 21:29:37 +0100
message:
  I don't think we'll ever have NULL objects in a DisplayList, so turn a 
condition about that into an assertion checking
modified:
  libcore/DisplayList.cpp
=== modified file 'libcore/DisplayList.cpp'
--- a/libcore/DisplayList.cpp   2009-11-06 09:07:36 +0000
+++ b/libcore/DisplayList.cpp   2009-12-16 20:29:37 +0000
@@ -28,6 +28,7 @@
 #include <iostream>
 #include <algorithm>
 #include <stack>
+#include <cassert>
 #include <boost/bind.hpp>
 
 namespace gnash {
@@ -107,7 +108,7 @@
     NameEquals(const std::string& name) : _name(name) {}
 
     bool operator() (const DisplayItem& item) {
-        if (!item) return false;
+        assert (item);
         return item->get_name() == _name;
     }
 
@@ -122,7 +123,7 @@
     NameEqualsNoCase(const std::string& name) : _name(name) {}
 
     bool operator() (const DisplayItem& item) {
-        if (!item) return false;
+        assert (item);
         return _noCaseEquals(item->get_name(), _name);
     }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]