[Libreoffice-commits] .: starmath/inc

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jan 14 07:40:19 PST 2011


 starmath/inc/node.hxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 5fbd9243458846208e4a36417872d8caeb3dcb82
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jan 14 13:13:47 2011 +0000

    WaE: C4244 conversion from int to USHORT

diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 5de6140..9d35e6b 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -355,13 +355,15 @@ public:
 
     virtual void  GetAccessibleText( String &rText ) const;
 
-    void SetSubNode(USHORT nIndex, SmNode* pNode){
-        int size = aSubNodes.size();
-        if(size <= nIndex){
+    void SetSubNode(size_t nIndex, SmNode* pNode)
+    {
+        size_t size = aSubNodes.size();
+        if (size <= nIndex)
+        {
             //Resize subnodes array
             aSubNodes.resize(nIndex + 1);
             //Set new slots to NULL
-            for(int i = size; i < nIndex+1; i++)
+            for (size_t i = size; i < nIndex+1; i++)
                 aSubNodes[i] = NULL;
         }
         aSubNodes[nIndex] = pNode;


More information about the Libreoffice-commits mailing list