Mercurial > projects > ddmd
diff dmd/TypeEnum.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/TypeEnum.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/TypeEnum.d Sat Aug 28 16:19:48 2010 +0200 @@ -41,12 +41,12 @@ assert(false); } } - Type syntaxCopy() + override Type syntaxCopy() { assert(false); } - ulong size(Loc loc) + override ulong size(Loc loc) { if (!sym.memtype) { @@ -56,36 +56,36 @@ return sym.memtype.size(loc); } - uint alignsize() + override uint alignsize() { assert(false); } - string toChars() + override string toChars() { assert(false); } - Type semantic(Loc loc, Scope sc) + override Type semantic(Loc loc, Scope sc) { //printf("TypeEnum::semantic() %s\n", toChars()); //sym.semantic(sc); 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(); Type.toDecoBuffer(buf, flag); 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) { @@ -95,7 +95,7 @@ buf.writestring(sym.toChars()); } - Expression dotExp(Scope sc, Expression e, Identifier ident) + override Expression dotExp(Scope sc, Expression e, Identifier ident) { version (LOGDOTEXP) { printf("TypeEnum::dotExp(e = '%s', ident = '%s') '%s'\n", e.toChars(), ident.toChars(), toChars()); @@ -122,33 +122,33 @@ return em; } - Expression getProperty(Loc loc, Identifier ident) + override Expression getProperty(Loc loc, Identifier ident) { assert(false); } - bool isintegral() + override bool isintegral() { return true; } - bool isfloating() + override bool isfloating() { return false; } - bool isscalar() + override bool isscalar() { return true; //return sym.memtype.isscalar(); } - bool isunsigned() + override bool isunsigned() { return sym.memtype.isunsigned(); } - MATCH implicitConvTo(Type to) + override MATCH implicitConvTo(Type to) { MATCH m; @@ -162,12 +162,12 @@ return m; } - MATCH constConv(Type to) + override MATCH constConv(Type to) { assert(false); } - Type toBasetype() + override Type toBasetype() { if (!sym.memtype) { @@ -179,7 +179,7 @@ return sym.memtype.toBasetype(); } - Expression defaultInit(Loc loc) + override Expression defaultInit(Loc loc) { version (LOGDEFAULTINIT) { printf("TypeEnum::defaultInit() '%s'\n", toChars()); @@ -194,7 +194,7 @@ return sym.defaultval; } - bool isZeroInit(Loc loc) + override bool isZeroInit(Loc loc) { if (!sym.defaultval) { @@ -205,17 +205,17 @@ return sym.defaultval.isBool(false); } - MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) + override MATCH deduceType(Scope sc, Type tparam, TemplateParameters parameters, Objects dedtypes) { assert(false); } - TypeInfoDeclaration getTypeInfoDeclaration() + override TypeInfoDeclaration getTypeInfoDeclaration() { return new TypeInfoEnumDeclaration(this); } - bool hasPointers() + override bool hasPointers() { return toBasetype().hasPointers(); } @@ -227,8 +227,8 @@ } } - type* toCtype() + override type* toCtype() { return sym.memtype.toCtype(); } -} \ No newline at end of file +}