Mercurial > projects > ddmd
diff dmd/TypeSArray.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 | f708f0452e81 |
children | 3a0b150c9841 acd69f84627e |
line wrap: on
line diff
--- a/dmd/TypeSArray.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/TypeSArray.d Sat Aug 28 16:19:48 2010 +0200 @@ -64,7 +64,7 @@ } } - Type syntaxCopy() + override Type syntaxCopy() { Type t = next.syntaxCopy(); Expression e = dim.syntaxCopy(); @@ -73,7 +73,7 @@ return t; } - ulong size(Loc loc) + override ulong size(Loc loc) { if (!dim) return Type.size(loc); @@ -96,12 +96,12 @@ return 1; } - uint alignsize() + override uint alignsize() { return next.alignsize(); } - Type semantic(Loc loc, Scope sc) + override Type semantic(Loc loc, Scope sc) { //printf("TypeSArray.semantic() %s\n", toChars()); @@ -225,7 +225,7 @@ return merge(); } - void resolve(Loc loc, Scope sc, Expression* pe, Type* pt, Dsymbol* ps) + override void resolve(Loc loc, Scope sc, Expression* pe, Type* pt, Dsymbol* ps) { //printf("TypeSArray.resolve() %s\n", toChars()); next.resolve(loc, sc, pe, pt, ps); @@ -289,7 +289,7 @@ } } - void toDecoBuffer(OutBuffer buf, int flag) + override void toDecoBuffer(OutBuffer buf, int flag) { Type.toDecoBuffer(buf, flag); if (dim) @@ -304,7 +304,7 @@ next.toDecoBuffer(buf, (flag & 0x100) ? flag : mod); } - void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) + override void toCBuffer2(OutBuffer buf, HdrGenState* hgs, MOD mod) { if (mod != this.mod) { @@ -315,7 +315,7 @@ buf.printf("[%s]", dim.toChars()); } - Expression dotExp(Scope sc, Expression e, Identifier ident) + override Expression dotExp(Scope sc, Expression e, Identifier ident) { version (LOGDOTEXP) { printf("TypeSArray.dotExp(e = '%s', ident = '%s')\n", e.toChars(), ident.toChars()); @@ -335,28 +335,28 @@ return e; } - bool isString() + override bool isString() { TY nty = next.toBasetype().ty; return nty == Tchar || nty == Twchar || nty == Tdchar; } - bool isZeroInit(Loc loc) + override bool isZeroInit(Loc loc) { return next.isZeroInit(loc); } - uint memalign(uint salign) + override uint memalign(uint salign) { return next.memalign(salign); } - MATCH constConv(Type to) + override MATCH constConv(Type to) { assert(false); } - MATCH implicitConvTo(Type to) + override MATCH implicitConvTo(Type to) { //printf("TypeSArray.implicitConvTo(to = %s) this = %s\n", to.toChars(), toChars()); @@ -417,7 +417,7 @@ return MATCHnomatch; } - Expression defaultInit(Loc loc) + override Expression defaultInit(Loc loc) { version (LOGDEFAULTINIT) { printf("TypeSArray.defaultInit() '%s'\n", toChars()); @@ -425,7 +425,7 @@ return next.defaultInit(loc); } - dt_t** toDt(dt_t** pdt) + override dt_t** toDt(dt_t** pdt) { return toDtElem(pdt, null); } @@ -486,7 +486,7 @@ return pdt; } - MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) + override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) { static if (false) { printf("TypeSArray.deduceType()\n"); @@ -581,17 +581,17 @@ return MATCHnomatch; } - TypeInfoDeclaration getTypeInfoDeclaration() + override TypeInfoDeclaration getTypeInfoDeclaration() { return new TypeInfoStaticArrayDeclaration(this); } - Expression toExpression() + override Expression toExpression() { assert(false); } - bool hasPointers() + override bool hasPointers() { return next.hasPointers(); } @@ -603,7 +603,7 @@ } } - type* toCtype() + override type* toCtype() { if (!ctype) { @@ -615,9 +615,9 @@ return ctype; } - type* toCParamtype() + override type* toCParamtype() { // arrays are passed as pointers return next.pointerTo().toCtype(); } -} \ No newline at end of file +}