Non-functional: Round of adding 'const', related to more efficient getFullNamespaceName().

This commit is contained in:
John Kessenich 2017-03-28 23:43:10 -06:00
parent 714e58b2fc
commit 4dc835c369
7 changed files with 32 additions and 31 deletions

View file

@ -2990,7 +2990,7 @@ void TParseContext::arrayDimMerge(TType& type, const TArraySizes* sizes)
// Do all the semantic checking for declaring or redeclaring an array, with and
// without a size, and make the right changes to the symbol table.
//
void TParseContext::declareArray(const TSourceLoc& loc, TString& identifier, const TType& type, TSymbol*& symbol)
void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifier, const TType& type, TSymbol*& symbol)
{
if (symbol == nullptr) {
bool currentScope;
@ -5053,7 +5053,7 @@ TVariable* TParseContext::makeInternalVariable(const char* name, const TType& ty
//
// Return the successfully declared variable.
//
TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, TString& identifier, TType& type)
TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString& identifier, const TType& type)
{
// make a new variable
TVariable* variable = new TVariable(&identifier, type);