Mercurial > projects > ddmd
diff dmd/StringExp.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 | df6d0f967680 |
line wrap: on
line diff
--- a/dmd/StringExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/StringExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -62,7 +62,7 @@ this.postfix = postfix; } - bool equals(Object o) + override bool equals(Object o) { Expression e; //printf("StringExp.equals('%s')\n", o.toChars()); @@ -77,7 +77,7 @@ return false; } - string toChars() + override string toChars() { scope OutBuffer buf = new OutBuffer(); HdrGenState hgs; @@ -89,7 +89,7 @@ return buf.extractString(); } - Expression semantic(Scope sc) + override Expression semantic(Scope sc) { version (LOGSEMANTIC) { printf("StringExp.semantic() %s\n", toChars()); @@ -168,7 +168,7 @@ return this; } - Expression interpret(InterState istate) + override Expression interpret(InterState istate) { version (LOG) { printf("StringExp.interpret() %.*s\n", toChars()); @@ -243,7 +243,7 @@ return this; } - Expression implicitCastTo(Scope sc, Type t) + override Expression implicitCastTo(Scope sc, Type t) { //printf("StringExp.implicitCastTo(%s of type %s) => %s\n", toChars(), type.toChars(), t.toChars()); ubyte committed = this.committed; @@ -256,7 +256,7 @@ return e; } - MATCH implicitConvTo(Type t) + override MATCH implicitConvTo(Type t) { MATCH m; @@ -338,7 +338,7 @@ return ((tf) * 256 + (tt)); } - Expression castTo(Scope sc, Type t) + override Expression castTo(Scope sc, Type t) { /* This follows copy-on-write; any changes to 'this' * will result in a copy. @@ -577,7 +577,7 @@ return e; } - int opCmp(Object obj) + override int opCmp(Object obj) { // Used to sort case statement expressions so we can do an efficient lookup StringExp se2 = cast(StringExp)(obj); @@ -635,7 +635,7 @@ return len1 - len2; } - bool isBool(bool result) + override bool isBool(bool result) { assert(false); } @@ -665,7 +665,7 @@ return value; } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { buf.writeByte('"'); for (size_t i = 0; i < len; i++) @@ -698,7 +698,7 @@ buf.writeByte(postfix); } - void toMangleBuffer(OutBuffer buf) + override void toMangleBuffer(OutBuffer buf) { char m; OutBuffer tmp = new OutBuffer(); @@ -751,7 +751,7 @@ buf.printf("%02x", q[i]); } - elem* toElem(IRState* irs) + override elem* toElem(IRState* irs) { elem* e; Type tb = type.toBasetype(); @@ -858,7 +858,7 @@ return e; } - dt_t** toDt(dt_t** pdt) + override dt_t** toDt(dt_t** pdt) { //printf("StringExp.toDt() '%s', type = %s\n", toChars(), type.toChars()); Type t = type.toBasetype();