Mercurial > projects > ddmd
diff dmd/VarDeclaration.d @ 72:2e2a5c3f943a
reduced warnings by adding override to the methods
think this also normalizes different line endings used all over the place
author | Trass3r |
---|---|
date | Sat, 28 Aug 2010 16:19:48 +0200 |
parents | ee3a9f34dc48 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/VarDeclaration.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/VarDeclaration.d Sat Aug 28 16:19:48 2010 +0200 @@ -108,7 +108,7 @@ nestedrefs = new FuncDeclarations(); } - Dsymbol syntaxCopy(Dsymbol s) + override Dsymbol syntaxCopy(Dsymbol s) { //printf("VarDeclaration.syntaxCopy(%s)\n", toChars()); @@ -156,7 +156,7 @@ return sv; } - void semantic(Scope sc) + override void semantic(Scope sc) { static if (false) { printf("VarDeclaration.semantic('%s', parent = '%s')\n", toChars(), sc.parent.toChars()); @@ -648,7 +648,7 @@ } } - void semantic2(Scope sc) + override void semantic2(Scope sc) { //printf("VarDeclaration.semantic2('%s')\n", toChars()); if (init && !toParent().isFuncDeclaration()) @@ -667,12 +667,12 @@ } } - string kind() + override string kind() { return "variable"; } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { StorageClassDeclaration.stcToCBuffer(buf, storage_class); @@ -702,13 +702,13 @@ Type htype; Initializer hinit; } - bool needThis() + override bool needThis() { //printf("VarDeclaration.needThis(%s, x%x)\n", toChars(), storage_class); return (storage_class & STC.STCfield) != 0; } - bool isImportedSymbol() + override bool isImportedSymbol() { if (protection == PROT.PROTexport && !init && (storage_class & STC.STCstatic || parent.isModule())) return true; @@ -716,7 +716,7 @@ return false; } - bool isDataseg() + override bool isDataseg() { static if (false) { printf("VarDeclaration.isDataseg(%p, '%s')\n", this, toChars()); @@ -737,7 +737,7 @@ return canTakeAddressOf() && (storage_class & (STC.STCstatic | STC.STCextern | STC.STCtls | STC.STCgshared) || toParent().isModule() || toParent().isTemplateInstance()); } - bool isThreadlocal() + override bool isThreadlocal() { //printf("VarDeclaration.isThreadlocal(%p, '%s')\n", this, toChars()); static if (false) { /// || TARGET_OSX @@ -755,7 +755,7 @@ } } - bool hasPointers() + override bool hasPointers() { //printf("VarDeclaration.hasPointers() %s, ty = %d\n", toChars(), type.ty); return (!isDataseg() && type.hasPointers()); @@ -927,7 +927,7 @@ return null; } - void checkCtorConstInit() + override void checkCtorConstInit() { static if (false) { /* doesn't work if more than one static ctor */ if (ctorinit == 0 && isCtorinit() && !(storage_class & STCfield)) @@ -978,14 +978,14 @@ } } - Dsymbol toAlias() + override Dsymbol toAlias() { //printf("VarDeclaration::toAlias('%s', this = %p, aliassym = %p)\n", toChars(), this, aliassym); assert(this !is aliassym); return aliassym ? aliassym.toAlias() : this; } - Symbol* toSymbol() + override Symbol* toSymbol() { //printf("VarDeclaration.toSymbol(%s)\n", toChars()); //if (needThis()) *(char*)0=0; @@ -1097,7 +1097,7 @@ return csym; } - void toObjFile(int multiobj) // compile to .obj file + override void toObjFile(int multiobj) // compile to .obj file { Symbol* s; uint sz; @@ -1231,11 +1231,11 @@ } } - int cvMember(ubyte* p) + override int cvMember(ubyte* p) { assert(false); } // Eliminate need for dynamic_cast - VarDeclaration isVarDeclaration() { return this; } + override VarDeclaration isVarDeclaration() { return this; } }