From 509fc4654e5dfcfd7fa98460228cd32114a8cc8a Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 13 Feb 2006 01:54:33 +0000 Subject: [PATCH] optimization: do not notify any listeners if attributes' new value is the same as old --- src/xml/simple-node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index fa626a3f2..d83e5d54b 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -429,7 +429,7 @@ SimpleNode::setAttribute(gchar const *name, gchar const *value, bool const is_in } } - if ( new_value != old_value ) { + if ( new_value != old_value && (!old_value || !new_value || strcmp(old_value, new_value))) { if (_logger) { _logger->notifyAttributeChanged(*this, key, old_value, new_value); } -- 2.30.2