Mercurial > projects > ddmd
diff dmd/TypeStruct.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 | 8c2c7b7579f8 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/TypeStruct.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/TypeStruct.d Sat Aug 28 16:19:48 2010 +0200 @@ -82,12 +82,12 @@ return cloneTo(new TypeStruct(sym)); } } - ulong size(Loc loc) + override ulong size(Loc loc) { return sym.size(loc); } - uint alignsize() + override uint alignsize() { uint sz; @@ -98,7 +98,7 @@ return sz; } - string toChars() + override string toChars() { //printf("sym.parent: %s, deco = %s\n", sym.parent.toChars(), deco); if (mod) @@ -111,12 +111,12 @@ return sym.toChars(); } - Type syntaxCopy() + override Type syntaxCopy() { assert(false); } - Type semantic(Loc loc, Scope sc) + override Type semantic(Loc loc, Scope sc) { //printf("TypeStruct.semantic('%s')\n", sym.toChars()); @@ -128,12 +128,12 @@ return merge(); } - Dsymbol toDsymbol(Scope sc) + override Dsymbol toDsymbol(Scope sc) { return sym; } - void toDecoBuffer(OutBuffer buf, int flag) + override void toDecoBuffer(OutBuffer buf, int flag) { string name = sym.mangle(); //printf("TypeStruct.toDecoBuffer('%s') = '%s'\n", toChars(), name); @@ -141,7 +141,7 @@ buf.printf("%s", name); } - void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) + override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) { if (mod != this.mod) { @@ -155,7 +155,7 @@ buf.writestring(sym.toChars()); } - Expression dotExp(Scope sc, Expression e, Identifier ident) + override Expression dotExp(Scope sc, Expression e, Identifier ident) { uint offset; @@ -402,13 +402,13 @@ return de.semantic(sc); } - uint memalign(uint salign) + override uint memalign(uint salign) { sym.size(Loc(0)); // give error for forward references return sym.structalign; } - Expression defaultInit(Loc loc) + override Expression defaultInit(Loc loc) { Symbol* s; Declaration d; @@ -423,12 +423,12 @@ return new VarExp(sym.loc, d); } - bool isZeroInit(Loc loc) + override bool isZeroInit(Loc loc) { return sym.zeroInit; } - int isAssignable() + override int isAssignable() { /* If any of the fields are const or invariant, * then one cannot assign this struct. @@ -442,18 +442,18 @@ return true; } - bool checkBoolean() + override bool checkBoolean() { return false; } - dt_t** toDt(dt_t** pdt) + override dt_t** toDt(dt_t** pdt) { sym.toDt(pdt); return pdt; } - MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) + override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) { //printf("TypeStruct.deduceType()\n"); //printf("\tthis.parent = %s, ", sym.parent.toChars()); print(); @@ -506,12 +506,12 @@ return Type.deduceType(sc, tparam, parameters, dedtypes); } - TypeInfoDeclaration getTypeInfoDeclaration() + override TypeInfoDeclaration getTypeInfoDeclaration() { return new TypeInfoStructDeclaration(this); } - bool hasPointers() + override bool hasPointers() { StructDeclaration s = sym; @@ -527,7 +527,7 @@ return false; } - MATCH implicitConvTo(Type to) + override MATCH implicitConvTo(Type to) { MATCH m; @@ -579,7 +579,7 @@ return m; } - MATCH constConv(Type to) + override MATCH constConv(Type to) { if (equals(to)) return MATCHexact; @@ -588,7 +588,7 @@ return MATCHnomatch; } - Type toHeadMutable() + override Type toHeadMutable() { assert(false); } @@ -600,7 +600,7 @@ } } - type* toCtype() + override type* toCtype() { type* t; Symbol* s; @@ -644,4 +644,4 @@ //printf("t = %p, Tflags = x%x\n", t, t.Tflags); return t; } -} \ No newline at end of file +}