X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=ginac%2Fpolynomial%2Fcollect_vargs.h;h=0deb9dc3a179a4c50f88edacf2df69ef858d1682;hb=refs%2Ftags%2Frelease_1-7-1;hp=a927c3f5ed1f410d67eb256bef2e9b09172f4fbf;hpb=b2ea74ecbae56d737aacf2cbb418d7c9998718a4;p=ginac.git diff --git a/ginac/polynomial/collect_vargs.h b/ginac/polynomial/collect_vargs.h index a927c3f5..0deb9dc3 100644 --- a/ginac/polynomial/collect_vargs.h +++ b/ginac/polynomial/collect_vargs.h @@ -3,7 +3,7 @@ * Interface to utility functions. */ /* - * GiNaC Copyright (C) 1999-2010 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2016 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 @@ -37,7 +37,7 @@ typedef std::vector exp_vector_t; static inline bool operator<(const exp_vector_t& v1, const exp_vector_t& v2) { return std::lexicographical_compare(v1.rbegin(), v1.rend(), - v2.rbegin(), v2.rend()); + v2.rbegin(), v2.rend()); } static inline bool operator>(const exp_vector_t& v1, const exp_vector_t& v2) @@ -49,14 +49,14 @@ static inline bool operator>(const exp_vector_t& v1, const exp_vector_t& v2) static inline bool zerop(const exp_vector_t& v) { - for (exp_vector_t::const_reverse_iterator i = v.rbegin(); i != v.rend(); ++i) { - if (*i != 0) + for (auto & i : v) { + if (i != 0) return false; } return true; } -typedef std::vector > ex_collect_t; +typedef std::vector> ex_collect_t; extern void collect_vargs(ex_collect_t& ec, const ex& e, const exvector& x);