]> www.ginac.de Git - ginac.git/blobdiff - ginac/ncmul.cpp
- made nops() return unsigned instead of int
[ginac.git] / ginac / ncmul.cpp
index 5dce23f41fe5df2a27834798e33024f1c08a9fcd..d3a6883f985ebfa884b1655b3d77de8b3136099a 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's non-commutative products of expressions. */
 
 /*
- *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -311,9 +311,9 @@ unsigned ncmul::count_factors(ex const & e) const
     if ((is_ex_exactly_of_type(e,mul)&&(e.return_type()!=return_types::commutative))||
         (is_ex_exactly_of_type(e,ncmul))) {
         unsigned factors=0;
-        for (int i=0; i<e.nops(); i++) {
+        for (unsigned i=0; i<e.nops(); i++)
             factors += count_factors(e.op(i));
-        }
+        
         return factors;
     }
     return 1;
@@ -323,9 +323,9 @@ void ncmul::append_factors(exvector & v, ex const & e) const
 {
     if ((is_ex_exactly_of_type(e,mul)&&(e.return_type()!=return_types::commutative))||
         (is_ex_exactly_of_type(e,ncmul))) {
-        for (int i=0; i<e.nops(); i++) {
+        for (unsigned i=0; i<e.nops(); i++)
             append_factors(v,e.op(i));
-        }
+        
         return;
     }
     v.push_back(e);