[ooo-build-commit] .: xml2cmp/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Sep 29 05:00:41 PDT 2010


 xml2cmp/source/support/list.hxx |    5 +----
 xml2cmp/source/xcd/xmlelem.cxx  |    2 +-
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 4f5fbaa160b626fd1f87d39b1a885398e0d4b795
Author: Seo Sanghyeon <sanxiyn at gmail.com>
Date:   Wed Sep 29 13:59:36 2010 +0200

    Removes is_valid_index method for future migration to STL

diff --git a/xml2cmp/source/support/list.hxx b/xml2cmp/source/support/list.hxx
index 944fcec..984ccba 100644
--- a/xml2cmp/source/support/list.hxx
+++ b/xml2cmp/source/support/list.hxx
@@ -72,9 +72,6 @@ class List
 
     unsigned            size() const            { return len; }
     unsigned            space() const           { return allocated; }
-    bool                is_valid_index(
-                            unsigned			n) const
-                                                { return n < len; }
     // ACCESS
     XX &                front()                 { return elem(0); }
     XX &                back()                  { return elem(len-1); }
@@ -238,7 +235,7 @@ template <class XY>
 void
 DynamicList<XY>::remove( unsigned           pos )
 {
-    if (!this->is_valid_index(pos) )
+    if (pos >= this->len)
         return;
     this->len--;
     delete this->inhalt[pos];
diff --git a/xml2cmp/source/xcd/xmlelem.cxx b/xml2cmp/source/xcd/xmlelem.cxx
index f4bffb7..234aac0 100644
--- a/xml2cmp/source/xcd/xmlelem.cxx
+++ b/xml2cmp/source/xcd/xmlelem.cxx
@@ -207,7 +207,7 @@ MultipleTextElement::Data( unsigned i_nNr ) const
 {
     static const Simstr sNull_;
 
-    if (aContent.is_valid_index(i_nNr))
+    if (i_nNr < aContent.size())
         return aContent[i_nNr];
     return sNull_;
 }


More information about the ooo-build-commit mailing list