From 0f6e70628b0899caadcedcc45660176a3ea5d065 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Mon, 13 Feb 2006 01:54:33 +0000 Subject: optimization: do not notify any listeners if attributes' new value is the same as old (bzr r121) --- src/xml/simple-node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/xml') 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); } -- cgit v1.2.3