Skip to content

Commit f8b5434

Browse files
committed
rcx: remove unused members from parser
Signed-off-by: Peter Gadfort <[email protected]>
1 parent a488975 commit f8b5434

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

src/rcx/src/parse.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ static char* ATH__allocCharWord(int n, utl::Logger* logger)
4949
Ath__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()
8683
void 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

112104
int Ath__parser::getLineNum()

src/rcx/src/parse.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)