]> www.ginac.de Git - ginac.git/blobdiff - ginac/pseries.cpp
Avoid "catching polymorphic type by value" warnings.
[ginac.git] / ginac / pseries.cpp
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));
        }