]> www.ginac.de Git - ginac.git/blobdiff - ginac/idx.cpp
* ginac/registrar.h: dtor is inlined now.
[ginac.git] / ginac / idx.cpp
index 34d5c854c00f55c47be8b64b4959a8bffdd844f5..3c378840bca30930bafb3dbaad7787e1719ed3b2 100644 (file)
@@ -30,9 +30,7 @@
 #include "utils.h"
 #include "debugmsg.h"
 
-#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
 
 GINAC_IMPLEMENT_REGISTERED_CLASS(idx, basic)
 
@@ -49,28 +47,6 @@ idx::idx() : inherited(TINFO_idx), symbolic(true), covariant(false)
        name=autoname_prefix()+ToString(serial);
 }
 
-idx::~idx() 
-{
-       debugmsg("idx destructor",LOGLEVEL_DESTRUCT);
-       destroy(false);
-}
-
-idx::idx(const idx & other)
-{
-       debugmsg("idx copy constructor",LOGLEVEL_CONSTRUCT);
-       copy(other);
-}
-
-const idx & idx::operator=(const idx & other)
-{
-       debugmsg("idx operator=",LOGLEVEL_ASSIGNMENT);
-       if (this != &other) {
-               destroy(true);
-               copy(other);
-       }
-       return *this;
-}
-
 // protected
 
 void idx::copy(const idx & other)
@@ -192,12 +168,6 @@ void idx::archive(archive_node &n) const
 
 // public
 
-basic * idx::duplicate() const
-{
-       debugmsg("idx duplicate",LOGLEVEL_DUPLICATE);
-       return new idx(*this);
-}
-
 void idx::printraw(std::ostream & os) const
 {
        debugmsg("idx printraw",LOGLEVEL_PRINT);
@@ -290,7 +260,7 @@ ex idx::subs(const lst & ls, const lst & lr) const
 int idx::compare_same_type(const basic & other) const
 {
        GINAC_ASSERT(is_of_type(other,idx));
-       const idx &o = static_cast<const idx &>(&other);
+       const idx &o = static_cast<const idx &>(other);
 
        if (covariant!=o.covariant) {
                // different co/contravariant
@@ -555,6 +525,4 @@ ex subs_indices(const ex & e, const exvector & idxv_subs, const exvector & idxv_
        return res;
 }
 
-#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC