]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
Replace use of NULL by C++11 nullptr.
[ginac.git] / ginac / pseries.cpp
index f95bbf6df4b0bc6fab2d8ef0c387f83added262c..e50af5150ff22eb0ecd3ac7310ba0501c4552cad 100644 (file)
@@ -4,7 +4,7 @@
  *  methods for series expansion. */
 
 /*
- *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2015 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
@@ -424,14 +424,12 @@ ex pseries::conjugate() const
        epvector * newseq = conjugateepvector(seq);
        ex newpoint = point.conjugate();
 
-       if (!newseq     && are_ex_trivially_equal(point, newpoint)) {
+       if (!newseq && are_ex_trivially_equal(point, newpoint)) {
                return *this;
        }
 
        ex result = (new pseries(var==newpoint, newseq ? *newseq : seq))->setflag(status_flags::dynallocated);
-       if (newseq) {
-               delete newseq;
-       }
+       delete newseq;
        return result;
 }
 
@@ -467,7 +465,7 @@ ex pseries::imag_part() const
 
 ex pseries::eval_integ() const
 {
-       epvector *newseq = NULL;
+       epvector *newseq = nullptr;
        for (epvector::const_iterator i=seq.begin(); i!=seq.end(); ++i) {
                if (newseq) {
                        newseq->push_back(expair(i->rest.eval_integ(), i->coeff));
@@ -962,7 +960,7 @@ ex mul::series(const relational & r, int order, unsigned options) const
                                orderloop++;
                                real_ldegree = buf.series(r, orderloop, options).ldegree(sym);
                        } while ((real_ldegree == orderloop)
-                                       && ( factor*real_ldegree < degbound));
+                             && (factor*real_ldegree < degbound));
                        ldegrees[j] = factor * real_ldegree;
                        degbound -= factor * real_ldegree;
                }
@@ -1231,7 +1229,7 @@ ex integral::series(const relational & r, int order, unsigned options) const
        if (x.subs(r) != x)
                throw std::logic_error("Cannot series expand wrt dummy variable");
        
-       // Expanding integrant with r substituted taken in boundaries.
+       // Expanding integrand with r substituted taken in boundaries.
        ex fseries = f.series(r, order, options);
        epvector fexpansion;
        fexpansion.reserve(fseries.nops());