]> www.ginac.de Git - ginac.git/blobdiff - ginac/lst.cpp
- ASSERT macro renamed to GINAC_ASSERT
[ginac.git] / ginac / lst.cpp
index 0c752ccd9555e4cf5d3d56592bac5b6a5e95297b..227835f29b234a140796eef093367176634e38aa 100644 (file)
@@ -1,6 +1,8 @@
 /** @file lst.cpp
  *
- *  Implementation of GiNaC's lst. 
+ *  Implementation of GiNaC's lst. */
+
+/*
  *  This file was generated automatically by container.pl.
  *  Please do not modify it directly, edit the perl script instead!
  *  container.pl options: $CONTAINER=lst
@@ -33,6 +35,9 @@
 
 #include "lst.h"
 #include "ex.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
 
 #define RESERVE(s,size) // no reserve needed for list
 
@@ -103,7 +108,7 @@ lst::lst(exlist const & s, bool discardable) :  basic(TINFO_lst)
 lst::lst(exlist * vp) : basic(TINFO_lst)
 {
     debugmsg("lst constructor from exlist *",LOGLEVEL_CONSTRUCT);
-    ASSERT(vp!=0);
+    GINAC_ASSERT(vp!=0);
     seq.swap(*vp);
     delete vp;
 }
@@ -303,8 +308,8 @@ int lst::nops() const
 
 ex & lst::let_op(int const i)
 {
-    ASSERT(i>=0);
-    ASSERT(i<nops());
+    GINAC_ASSERT(i>=0);
+    GINAC_ASSERT(i<nops());
 
     exlist::iterator it=seq.begin();
     for (int j=0; j<i; j++) {
@@ -329,7 +334,7 @@ ex lst::expand(unsigned options) const
 
 bool lst::has(ex const & other) const
 {
-    ASSERT(other.bp!=0);
+    GINAC_ASSERT(other.bp!=0);
     if (is_equal(*other.bp)) return true;
     for (exlist::const_iterator it=seq.begin(); it!=seq.end(); ++it) {
         if ((*it).has(other)) return true;
@@ -377,7 +382,7 @@ ex lst::subs(lst const & ls, lst const & lr) const
 
 int lst::compare_same_type(basic const & other) const
 {
-    ASSERT(is_of_type(other,lst));
+    GINAC_ASSERT(is_of_type(other,lst));
     lst const & o=static_cast<lst const &>
                                     (const_cast<basic &>(other));
     int cmpval;
@@ -398,7 +403,7 @@ int lst::compare_same_type(basic const & other) const
 
 bool lst::is_equal_same_type(basic const & other) const
 {
-    ASSERT(is_of_type(other,lst));
+    GINAC_ASSERT(is_of_type(other,lst));
     lst const & o=static_cast<lst const &>
                                     (const_cast<basic &>(other));
     if (seq.size()!=o.seq.size()) return false;
@@ -627,3 +632,5 @@ unsigned lst::precedence=10;
 const lst some_lst;
 type_info const & typeid_lst=typeid(some_lst);
 
+} // namespace GiNaC
+