]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.pl
moved ToString() here from utils.h
[ginac.git] / ginac / structure.pl
index 8b644540ca4cee81776156d810c6c203b4abf5d5..f6b8a4898855e71f1d13e4645f8822778aded59b 100755 (executable)
@@ -170,7 +170,7 @@ protected:
 public:
        ${STRUCTURE}(${constructor_arglist});
 
-       // functions overriding virtual functions from bases classes
+       // functions overriding virtual functions from base classes
 public:
        basic * duplicate() const;
        void print(const print_context & c, unsigned level = 0) const;
@@ -313,7 +313,7 @@ ${STRUCTURE}::${STRUCTURE}(${constructor_arglist})
 }
 
 //////////
-// functions overriding virtual functions from bases classes
+// functions overriding virtual functions from base classes
 //////////
 
 // public
@@ -433,8 +433,7 @@ ${subs_statements}
 int ${STRUCTURE}::compare_same_type(const basic & other) const
 {
        GINAC_ASSERT(is_of_type(other,${STRUCTURE}));
-       ${STRUCTURE} const & o=static_cast<${STRUCTURE} const &>
-                                                                       (const_cast<basic &>(other));
+       ${STRUCTURE} const &o = static_cast<const ${STRUCTURE} &>(other);
        int cmpval;
 ${compare_statements}
        return 0;
@@ -443,8 +442,7 @@ ${compare_statements}
 bool ${STRUCTURE}::is_equal_same_type(const basic & other) const
 {
        GINAC_ASSERT(is_of_type(other,${STRUCTURE}));
-       ${STRUCTURE} const & o=static_cast<${STRUCTURE} const &>
-                                                                       (const_cast<basic &>(other));
+       ${STRUCTURE} const &o = static_cast<const ${STRUCTURE} &>(other);
 ${is_equal_statements}
        return true;
 }