Mercurial > projects > ddmd
diff dmd/RealExp.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 | cab4c37afb89 |
children | ef02e2e203c2 |
line wrap: on
line diff
--- a/dmd/RealExp.d Sat Aug 28 16:14:07 2010 +0200 +++ b/dmd/RealExp.d Sat Aug 28 16:19:48 2010 +0200 @@ -1,26 +1,26 @@ -module dmd.RealExp; - -import dmd.Expression; -import dmd.backend.elem; -import dmd.InterState; -import dmd.Type; -import dmd.OutBuffer; -import dmd.Loc; -import dmd.TOK; -import dmd.Scope; +module dmd.RealExp; + +import dmd.Expression; +import dmd.backend.elem; +import dmd.InterState; +import dmd.Type; +import dmd.OutBuffer; +import dmd.Loc; +import dmd.TOK; +import dmd.Scope; import dmd.IRState; -import dmd.Type; +import dmd.Type; import dmd.HdrGenState; import dmd.Port; import dmd.TY; - + import dmd.backend.dt_t; import dmd.backend.Util; import dmd.backend.TYM; import dmd.backend.mTY; -import dmd.Complex; - +import dmd.Complex; + class RealExp : Expression { real value; @@ -33,12 +33,12 @@ this.type = type; } - bool equals(Object o) + override bool equals(Object o) { assert(false); } - Expression semantic(Scope sc) + override Expression semantic(Scope sc) { if (!type) type = Type.tfloat64; @@ -47,42 +47,42 @@ return this; } - Expression interpret(InterState istate) + override Expression interpret(InterState istate) { assert(false); } - string toChars() + override string toChars() { assert(false); } - ulong toInteger() + override ulong toInteger() { assert(false); } - ulong toUInteger() + override ulong toUInteger() { assert(false); } - real toReal() + override real toReal() { return type.isreal() ? value : 0; } - real toImaginary() + override real toImaginary() { return type.isreal() ? 0 : value; } - Complex!(real) toComplex() + override Complex!(real) toComplex() { return Complex!(real)(toReal(), toImaginary()); } - Expression castTo(Scope sc, Type t) + override Expression castTo(Scope sc, Type t) { Expression e = this; if (type != t) @@ -100,27 +100,27 @@ return e; } - int isConst() + override int isConst() { return 1; } - bool isBool(bool result) + override bool isBool(bool result) { assert(false); } - void toCBuffer(OutBuffer buf, HdrGenState* hgs) + override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { assert(false); } - void toMangleBuffer(OutBuffer buf) + override void toMangleBuffer(OutBuffer buf) { assert(false); } - elem* toElem(IRState* irs) + override elem* toElem(IRState* irs) { eve c; tym_t ty; @@ -166,7 +166,7 @@ static private char[6] zeropad; - dt_t** toDt(dt_t** pdt) + override dt_t** toDt(dt_t** pdt) { float fvalue; double dvalue;