fixed typo (flags -> fl) and made the set of flags cleared by the assignment
[ginac.git] / ginac / basic.cpp
index 09d9b79b996d66def75002892060c9ed16f28997..73f1072317c77d45e46754207223f5ba387f549d 100644 (file)
@@ -68,7 +68,7 @@ const basic & basic::operator=(const basic & other)
                // The other object is of a derived class, so clear the flags as they
                // might no longer apply (especially hash_calculated). Oh, and don't
                // copy the tinfo_key: it is already set correctly for this object.
-               flags = 0;
+               fl &= ~(status_flags::evaluated | status_flags::expanded | status_flags::hash_calculated);
        } else {
                // The objects are of the exact same class, so copy the hash value.
                hashvalue = other.hashvalue;