]> www.ginac.de Git - ginac.git/blobdiff - ginac/clifford.cpp
[BUGFIX] Fix crash in parser.
[ginac.git] / ginac / clifford.cpp
index 8257115e377bc8fd8d5a5d6a3350356c5ba9391b..2cf0facf015ab00375fa3e334fbb80573bcf1f5b 100644 (file)
@@ -3,7 +3,7 @@
  *  Implementation of GiNaC's clifford algebra (Dirac gamma) objects. */
 
 /*
- *  GiNaC Copyright (C) 1999-2017 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2024 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
@@ -1099,7 +1099,7 @@ ex clifford_star_bar(const ex & e, bool do_bar, unsigned options)
                ev.reserve(e1.nops());
                cv.reserve(e1.nops());
                // separate clifford and non-clifford entries
-               for (int i= 0; i < e1.nops(); ++i) {
+               for (size_t i= 0; i < e1.nops(); ++i) {
                        if (is_a<clifford>(e1.op(i)) && is_a<cliffordunit>(e1.op(i).op(0)))
                                cv.push_back(e1.op(i));
                        else
@@ -1281,7 +1281,7 @@ static ex get_clifford_comp(const ex & e, const ex & c, bool root=true)
                bool found=false, same_value_found=false;
                ex dummy_ind=0;
                ev.reserve(e1.nops());
-               for (int i=0; i < e1.nops();++i) {
+               for (size_t i=0; i < e1.nops(); ++i) {
                        // look for a Clifford unit with the same metric and representation label,
                        // if found remember its index
                        if (is_a<clifford>(e1.op(i)) && ex_to<clifford>(e1.op(i)).get_representation_label() == rl