]> www.ginac.de Git - ginac.git/blobdiff - ginac/basic.cpp
removed unnecessary const_cast
[ginac.git] / ginac / basic.cpp
index a296cf9a4a75ac42edbaa80b200ac01ae1910250..daac085617d01cb8d1c3d66077a3a82e4317c8e2 100644 (file)
@@ -528,7 +528,7 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const
 {
        exmap::const_iterator it;
 
-       if (options & subs_options::subs_no_pattern) {
+       if (options & subs_options::no_pattern) {
                it = m.find(*this);
                if (it != m.end())
                        return it->second;
@@ -536,7 +536,7 @@ ex basic::subs_one_level(const exmap & m, unsigned options) const
                for (it = m.begin(); it != m.end(); ++it) {
                        lst repl_lst;
                        if (match(ex_to<basic>(it->first), repl_lst))
-                               return it->second.subs(repl_lst, options | subs_options::subs_no_pattern); // avoid infinite recursion when re-substituting the wildcards
+                               return it->second.subs(repl_lst, options | subs_options::no_pattern); // avoid infinite recursion when re-substituting the wildcards
                }
        }
 
@@ -696,7 +696,7 @@ unsigned basic::calchash() const
        unsigned v = golden_ratio_hash(tinfo());
        for (size_t i=0; i<nops(); i++) {
                v = rotate_left(v);
-               v ^= (const_cast<basic *>(this))->op(i).gethash();
+               v ^= this->op(i).gethash();
        }
 
        // store calculated hash value only if object is already evaluated