X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=sidebyside;f=ginac%2Fstructure.pl;h=f6b8a4898855e71f1d13e4645f8822778aded59b;hb=559c3bfd89b822b16708b23af1b0d9af17ededfe;hp=901c5722d11da5b2f459d2d83c83a0cc3cc35b47;hpb=94c15f8b02a5a9e274d3aedcefd76565861b4219;p=ginac.git diff --git a/ginac/structure.pl b/ginac/structure.pl index 901c5722..f6b8a489 100755 --- a/ginac/structure.pl +++ b/ginac/structure.pl @@ -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; @@ -209,10 +209,6 @@ extern const ${STRUCTURE} some_${STRUCTURE}; extern const type_info & typeid_${STRUCTURE}; extern const unsigned tinfo_${STRUCTURE}; -// macros - -#define ex_to_${STRUCTURE}(X) (static_cast<${STRUCTURE} const &>(*(X).bp)) - } // namespace GiNaC #endif // ndef _${STRUCTURE_UC}_H_ @@ -317,7 +313,7 @@ ${STRUCTURE}::${STRUCTURE}(${constructor_arglist}) } ////////// -// functions overriding virtual functions from bases classes +// functions overriding virtual functions from base classes ////////// // public @@ -437,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(other)); + ${STRUCTURE} const &o = static_cast(other); int cmpval; ${compare_statements} return 0; @@ -447,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(other)); + ${STRUCTURE} const &o = static_cast(other); ${is_equal_statements} return true; }