Ignore:
Timestamp:
01/21/09 14:26:15 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/BaseLinkDef.h

    r9229 r9234  
    2929
    3030#pragma link C++ class MSpline3+;
     31#pragma link C++ class MQuaternion+;
    3132
    3233#pragma link C++ class MString+;
  • trunk/MagicSoft/Mars/mbase/MArrayI.cc

    r5088 r9234  
    3636#include "MArrayI.h"
    3737
     38#include "MMath.h"
     39
    3840ClassImp(MArrayI);
    3941
     42void MArrayI::ReSort(Bool_t down)
     43{
     44    MMath::ReSort(fN, fArray, down);
     45}
  • trunk/MagicSoft/Mars/mbase/MArrayI.h

    r9211 r9234  
    7373        // Add char c at position i. Check for out of bounds.
    7474        fArray[i] = c;
     75    }
     76
     77    void Add(Int_t c)
     78    {
     79        Set(fN+1);
     80        fArray[fN-1] = c;
     81    }
     82
     83    Int_t Find(Int_t c) const
     84    {
     85        for (Int_t *ptr=fArray; ptr<fArray+fN; ptr++)
     86            if (*ptr==c)
     87                return ptr-fArray;
     88
     89        return -1;
     90    }
     91
     92    void AddUniq(Int_t c)
     93    {
     94        if (Find(c)<0)
     95            Add(c);
    7596    }
    7697
     
    157178    }
    158179
     180    void ReSort(Bool_t down=kFALSE);
     181
    159182    ClassDef(MArrayI, 1)  //Array of Int_t
    160183};
  • trunk/MagicSoft/Mars/mbase/MMath.cc

    r9226 r9234  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.44 2009-01-17 14:52:37 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.45 2009-01-21 14:22:39 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    347347        *ptr = cpy[*idx++];
    348348
    349     delete cpy;
    350     delete pos;
     349    delete [] cpy;
     350    delete [] pos;
    351351}
    352352
  • trunk/MagicSoft/Mars/mbase/Makefile

    r9229 r9234  
    2424           MMath.cc \
    2525           MSpline3.cc \
     26           MQuaternion.cc \
    2627           MEnv.cc \
    2728           MLog.cc \
Note: See TracChangeset for help on using the changeset viewer.