Remove unneeded firstLineChar member in ASBeautifier
This commit is contained in:
parent
a3ccecfa4a
commit
063a8b06b6
@ -254,7 +254,6 @@ ASBeautifier::ASBeautifier(const ASBeautifier& other) : ASBase(other)
|
||||
currentNonSpaceCh = other.currentNonSpaceCh;
|
||||
currentNonLegalCh = other.currentNonLegalCh;
|
||||
prevNonLegalCh = other.prevNonLegalCh;
|
||||
lineFirstChar = other.lineFirstChar;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,7 +369,6 @@ void ASBeautifier::init(ASSourceIterator* iter)
|
||||
prevNonLegalCh = '{';
|
||||
currentNonLegalCh = '{';
|
||||
quoteChar = ' ';
|
||||
lineFirstChar = ' ';
|
||||
probationHeader = NULL;
|
||||
lastLineHeader = NULL;
|
||||
backslashEndsPrevLine = false;
|
||||
@ -885,7 +883,6 @@ string ASBeautifier::beautify(const string& originalLine)
|
||||
haveLineContinuationChar = false;
|
||||
lineOpeningBlocksNum = 0;
|
||||
lineClosingBlocksNum = 0;
|
||||
lineFirstChar = ' ';
|
||||
if (isImmediatelyPostObjCMethodDefinition)
|
||||
clearObjCMethodDefinitionAlignment();
|
||||
|
||||
@ -927,7 +924,6 @@ string ASBeautifier::beautify(const string& originalLine)
|
||||
line = trim(originalLine);
|
||||
if (line.length() > 0)
|
||||
{
|
||||
lineFirstChar = line[0];
|
||||
if (line[0] == '{')
|
||||
lineBeginsWithOpenBracket = true;
|
||||
else if (line[0] == '}')
|
||||
@ -2599,7 +2595,7 @@ void ASBeautifier::parseCurrentLine(const string& line)
|
||||
// <
|
||||
// class Argument
|
||||
// >
|
||||
if (lineFirstChar == '>' && !lineStartsInComment)
|
||||
if (line[0] == '>')
|
||||
{
|
||||
if (!inStatementIndentStack->empty())
|
||||
spaceIndentCount = inStatementIndentStack->back();
|
||||
@ -2649,7 +2645,7 @@ void ASBeautifier::parseCurrentLine(const string& line)
|
||||
// Argument1,
|
||||
// Argument2
|
||||
// >
|
||||
if (lineFirstChar == '>' && !lineStartsInComment)
|
||||
if (line[0] == '>')
|
||||
{
|
||||
if (!inStatementIndentStack->empty())
|
||||
spaceIndentCount = inStatementIndentStack->back();
|
||||
|
@ -279,6 +279,7 @@ protected: // functions definitions are at the end of ASResource.cpp
|
||||
bool isCharPotentialOperator(char ch) const;
|
||||
bool isDigitSeparator(const string& line, int i) const;
|
||||
char peekNextChar(const string& line, int i) const;
|
||||
|
||||
}; // Class ASBase
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -518,7 +519,6 @@ private: // variables
|
||||
char currentNonSpaceCh;
|
||||
char currentNonLegalCh;
|
||||
char prevNonLegalCh;
|
||||
char lineFirstChar;
|
||||
}; // Class ASBeautifier
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -593,6 +593,7 @@ private:
|
||||
// SQL variables
|
||||
bool nextLineIsDeclareIndent; // begin declare section indent is reached
|
||||
bool isInDeclareSection; // need to indent a declare section
|
||||
|
||||
}; // Class ASEnhancer
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -988,6 +989,7 @@ private: // inline functions
|
||||
// sort comparison functions for ASResource
|
||||
bool sortOnLength(const string* a, const string* b);
|
||||
bool sortOnName(const string* a, const string* b);
|
||||
|
||||
} // end of astyle namespace
|
||||
|
||||
// end of astyle namespace --------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user