<commit_before>// @(#)root/cont
// Author: <NAME> February 2014

/*************************************************************************
 * Copyright (C) 1995-2013, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TListOfEnums                                                         //
//                                                                      //
// A collection of TEnum objects designed for fast access given a       //
// DeclId_t and for keep track of TEnum that were described             //
// unloaded enum.                                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TListOfEnums.h"
#include "TClass.h"
#include "TExMap.h"
#include "TEnum.h"
#include "TGlobal.h"
#include "TInterpreter.h"
#include "TVirtualMutex.h"

ClassImp(TListOfEnums)

//______________________________________________________________________________
TListOfEnums::TListOfEnums(TClass *cl /*=0*/) :
   fClass(cl), fIds(0), fUnloaded(0), fIsLoaded(kFALSE), fLastLoadMarker(0)
{
   // Constructor.

   fIds = new TExMap(5);
   fUnloaded = new THashList(5);
}

//______________________________________________________________________________
TListOfEnums::~TListOfEnums()
{
   // Destructor.

   THashList::Delete();
   delete fIds;
   fUnloaded->Delete();
   delete fUnloaded;
}

//______________________________________________________________________________
void TListOfEnums::MapObject(TObject *obj)
{
   // Add pair<id, object> to the map of functions and their ids.

   TEnum *e = dynamic_cast<TEnum *>(obj);
   if (e && e->GetDeclId()) {
      fIds->Add((Long64_t)e->GetDeclId(), (Long64_t)e);
   }
}

//______________________________________________________________________________
void TListOfEnums::AddFirst(TObject *obj)
{<commit_msg>Centralise the size of the list<commit_after>// @(#)root/cont
// Author: <NAME> February 2014

/*************************************************************************
 * Copyright (C) 1995-2013, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TListOfEnums                                                         //
//                                                                      //
// A collection of TEnum objects designed for fast access given a       //
// DeclId_t and for keep track of TEnum that were described             //
// unloaded enum.                                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TListOfEnums.h"
#include "TClass.h"
#include "TExMap.h"
#include "TEnum.h"
#include "TGlobal.h"
#include "TInterpreter.h"
#include "TVirtualMutex.h"

static constexpr const unsigned int listSize=3;

ClassImp(TListOfEnums)

//______________________________________________________________________________
TListOfEnums::TListOfEnums(TClass *cl /*=0*/) :
   THashList(listSize), fClass(cl), fIds(0), fUnloaded(0), fIsLoaded(kFALSE), fLastLoadMarker(0)
{
   // Constructor.

   fIds = new TExMap(listSize);
   fUnloaded = new THashList(listSize);
}

//______________________________________________________________________________
TListOfEnums::~TListOfEnums()
{
   // Destructor.

   THashList::Delete();
   delete fIds;
   fUnloaded->Delete();
   delete fUnloaded;
}

//______________________________________________________________________________
void TListOfEnums::MapObject(TObject *obj)
{
   // Add pair<id, object> to the map of functions and their ids.

   TEnum *e = dynamic_cast<TEnum *>(obj);
   if (e && e->GetDeclId()) {
      fIds->Add((Long64_t)e->GetDeclId(), (Long64_t)e);
   }
}

//______________________________________________________________________________
void TListOfEnums::AddFirst(TObject *obj)
{
{'fraction_non_alphanumeric': 0.21043019480519481, 'fraction_numerical': 0.00872564935064935, 'mean_word_length': 1.5671875, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '752093', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1067, 'n_words': 244}