Skip to content

Commit

Permalink
[Refactoring] Rename field sds to scopesym
Browse files Browse the repository at this point in the history
Because it was confusing with parameter `sds` in some member functions.
  • Loading branch information
9rnsr committed May 13, 2015
1 parent acbe13e commit 779349b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/attrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ StaticIfDeclaration::StaticIfDeclaration(Condition *condition,
: ConditionalDeclaration(condition, decl, elsedecl)
{
//printf("StaticIfDeclaration::StaticIfDeclaration()\n");
sds = NULL;
scopesym = NULL;
addisdone = 0;
}

Expand Down Expand Up @@ -1224,7 +1224,7 @@ int StaticIfDeclaration::addMember(Scope *sc, ScopeDsymbol *sds, int memnum)
* const int k;
* }
*/
this->sds = sds;
this->scopesym = sds;
int m = 0;

if (0 && memnum == 0)
Expand All @@ -1250,14 +1250,14 @@ void StaticIfDeclaration::setScope(Scope *sc)

void StaticIfDeclaration::semantic(Scope *sc)
{
Dsymbols *d = include(sc, sds);
Dsymbols *d = include(sc, scopesym);

//printf("\tStaticIfDeclaration::semantic '%s', d = %p\n",toChars(), d);
if (d)
{
if (!addisdone)
{
AttribDeclaration::addMember(sc, sds, 1);
AttribDeclaration::addMember(sc, scopesym, 1);
addisdone = 1;
}

Expand All @@ -1284,7 +1284,7 @@ CompileDeclaration::CompileDeclaration(Loc loc, Expression *exp)
//printf("CompileDeclaration(loc = %d)\n", loc.linnum);
this->loc = loc;
this->exp = exp;
this->sds = NULL;
this->scopesym = NULL;
this->compiled = 0;
}

Expand All @@ -1300,7 +1300,7 @@ int CompileDeclaration::addMember(Scope *sc, ScopeDsymbol *sds, int memnum)
if (compiled)
return 1;

this->sds = sds;
this->scopesym = sds;
if (memnum == 0)
{
/* No members yet, so parse the mixin now
Expand Down Expand Up @@ -1357,7 +1357,7 @@ void CompileDeclaration::semantic(Scope *sc)
if (!compiled)
{
compileIt(sc);
AttribDeclaration::addMember(sc, sds, 0);
AttribDeclaration::addMember(sc, scopesym, 0);
compiled = 1;

if (scope && decl)
Expand Down
4 changes: 2 additions & 2 deletions src/attrib.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class ConditionalDeclaration : public AttribDeclaration
class StaticIfDeclaration : public ConditionalDeclaration
{
public:
ScopeDsymbol *sds;
ScopeDsymbol *scopesym;
int addisdone;

StaticIfDeclaration(Condition *condition, Dsymbols *decl, Dsymbols *elsedecl);
Expand All @@ -191,7 +191,7 @@ class CompileDeclaration : public AttribDeclaration
public:
Expression *exp;

ScopeDsymbol *sds;
ScopeDsymbol *scopesym;
int compiled;

CompileDeclaration(Loc loc, Expression *exp);
Expand Down

0 comments on commit 779349b

Please sign in to comment.