File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,6 @@ static char* ATH__allocCharWord(int n, utl::Logger* logger)
4949Ath__parser::Ath__parser (utl::Logger* logger)
5050{
5151 _logger = logger;
52- _lineSize = 10000 ;
53- _maxWordCnt = 100 ;
5452 init ();
5553}
5654
@@ -69,7 +67,6 @@ Ath__parser::~Ath__parser()
6967 }
7068 delete[] _inputFile;
7169 delete[] _line;
72- delete[] _tmpLine;
7370 delete[] _wordSeparators;
7471
7572 for (int ii = 0 ; ii < _maxWordCnt; ii++) {
@@ -86,7 +83,6 @@ Ath__parser::~Ath__parser()
8683void Ath__parser::init ()
8784{
8885 _line = ATH__allocCharWord (_lineSize, _logger);
89- _tmpLine = ATH__allocCharWord (_lineSize, _logger);
9086
9187 _wordArray = new char *[_maxWordCnt];
9288
@@ -98,15 +94,11 @@ void Ath__parser::init()
9894
9995 strcpy (_wordSeparators, " \n\t " );
10096
101- _commentChar = ' #' ;
102-
10397 _lineNum = 0 ;
10498 _currentWordCnt = -1 ;
10599
106100 _inFP = nullptr ;
107101 _inputFile = ATH__allocCharWord (512 , _logger);
108-
109- _progressLineChunk = 1000000 ;
110102}
111103
112104int Ath__parser::getLineNum ()
Original file line number Diff line number Diff line change @@ -56,17 +56,18 @@ class Ath__parser
5656 char * _tmpLine;
5757 char * _wordSeparators;
5858 char ** _wordArray;
59- char _commentChar;
60- int _maxWordCnt;
6159
6260 int _lineNum;
6361 int _currentWordCnt;
64- int _lineSize;
6562 FILE* _inFP;
6663 char * _inputFile;
6764
68- int _progressLineChunk;
6965 utl::Logger* _logger;
66+
67+ static constexpr int _progressLineChunk = 1000000 ;
68+ static constexpr char _commentChar = ' #' ;
69+ static constexpr int _maxWordCnt = 100 ;
70+ static constexpr int _lineSize = 10000 ;
7071};
7172
7273} // namespace rcx
You can’t perform that action at this time.
0 commit comments