]> www.ginac.de Git - ginac.git/commitdiff
Avoid "catching polymorphic type by value" warnings.
authorRichard Kreckel <kreckel@ginac.de>
Fri, 21 Aug 2020 17:10:12 +0000 (19:10 +0200)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 21 Aug 2020 17:10:12 +0000 (19:10 +0200)
ginac/inifcns_trans.cpp
ginac/pseries.cpp

index d4ec2d67343f6906275a44fbc0cded506a1e0f54..49e30047f9f78485e84ff4d3650dfd737bc59ef9 100644 (file)
@@ -197,7 +197,7 @@ static ex log_series(const ex &arg,
        // maybe substitution of rel into arg fails because of a pole
        try {
                arg_pt = arg.subs(rel, subs_options::no_pattern);
-       } catch (pole_error) {
+       } catch (pole_error &) {
                must_expand_arg = true;
        }
        // or we are at the branch point anyways
index b675c02eb2ecd3b6429bcaede30dcadce7365d9c..6fe4e54c1871c015cf0b4284c90481e85814f97c 100644 (file)
@@ -891,7 +891,7 @@ ex mul::series(const relational & r, int order, unsigned options) const
                bool flag_redo = false;
                try {
                        real_ldegree = buf.expand().ldegree(sym-r.rhs());
-               } catch (std::runtime_error) {}
+               } catch (std::runtime_error &) {}
 
                if (real_ldegree == 0) {
                        if ( factor < 0 ) {
@@ -1080,14 +1080,14 @@ ex power::series(const relational & r, int order, unsigned options) const
        bool must_expand_basis = false;
        try {
                basis.subs(r, subs_options::no_pattern);
-       } catch (pole_error) {
+       } catch (pole_error &) {
                must_expand_basis = true;
        }
 
        bool exponent_is_regular = true;
        try {
                exponent.subs(r, subs_options::no_pattern);
-       } catch (pole_error) {
+       } catch (pole_error &) {
                exponent_is_regular = false;
        }
 
@@ -1156,7 +1156,7 @@ ex power::series(const relational & r, int order, unsigned options) const
        ex result;
        try {
                result = ex_to<pseries>(e).power_const(numexp, order);
-       } catch (pole_error) {
+       } catch (pole_error &) {
                epvector ser { expair(Order(_ex1), order) };
                result = pseries(r, std::move(ser));
        }