Changeset 10858


Ignore:
Timestamp:
May 27, 2011, 1:27:52 PM (8 years ago)
Author:
tbretz
Message:
Changed the data member cnt's name -- it sometimes gave warnings using cnt locally in derived classes.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/DimErrorRedirecter.cc

    r10833 r10858  
    3333using namespace std;
    3434
    35 int DimErrorRedirecter::cnt = 0;
     35int DimErrorRedirecter::fDimErrorRedireterCnt = 0;
    3636
    3737// --------------------------------------------------------------------------
     
    4444DimErrorRedirecter::DimErrorRedirecter(MessageImp &imp) : fMsg(imp)
    4545{
    46     if (cnt++)
    47     {
    48         fMsg.Error("ERROR - More than one instance of MyHandlers.");
    49         exit(-1);
    50     }
     46    if (fDimErrorRedireterCnt++)
     47        throw logic_error("ERROR - More than one instance of MyHandlers.");
    5148
    5249    dic_disable_padding();
  • trunk/FACT++/src/DimErrorRedirecter.h

    r10511 r10858  
    99{
    1010private:
    11     static int cnt;
     11    static int fDimErrorRedireterCnt;
    1212
    1313    MessageImp &fMsg;
Note: See TracChangeset for help on using the changeset viewer.