comparison dmd/UnaExp.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 4290d870944a
children e28b18c23469
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
31 { 31 {
32 super(loc, op, size); 32 super(loc, op, size);
33 this.e1 = e1; 33 this.e1 = e1;
34 } 34 }
35 35
36 Expression syntaxCopy() 36 override Expression syntaxCopy()
37 { 37 {
38 UnaExp e = cast(UnaExp)copy(); 38 UnaExp e = cast(UnaExp)copy();
39 e.type = null; 39 e.type = null;
40 e.e1 = e.e1.syntaxCopy(); 40 e.e1 = e.e1.syntaxCopy();
41 41
42 return e; 42 return e;
43 } 43 }
44 44
45 Expression semantic(Scope sc) 45 override Expression semantic(Scope sc)
46 { 46 {
47 version (LOGSEMANTIC) { 47 version (LOGSEMANTIC) {
48 writef("UnaExp.semantic('%s')\n", toChars()); 48 writef("UnaExp.semantic('%s')\n", toChars());
49 } 49 }
50 e1 = e1.semantic(sc); 50 e1 = e1.semantic(sc);
51 // if (!e1.type) 51 // if (!e1.type)
52 // error("%s has no value", e1.toChars()); 52 // error("%s has no value", e1.toChars());
53 return this; 53 return this;
54 } 54 }
55 55
56 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 56 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
57 { 57 {
58 buf.writestring(Token.toChars(op)); 58 buf.writestring(Token.toChars(op));
59 expToCBuffer(buf, hgs, e1, precedence[op]); 59 expToCBuffer(buf, hgs, e1, precedence[op]);
60 } 60 }
61 61
62 Expression optimize(int result) 62 override Expression optimize(int result)
63 { 63 {
64 e1 = e1.optimize(result); 64 e1 = e1.optimize(result);
65 return this; 65 return this;
66 } 66 }
67 67
68 void dump(int indent) 68 override void dump(int indent)
69 { 69 {
70 assert(false); 70 assert(false);
71 } 71 }
72 72
73 void scanForNestedRef(Scope sc) 73 override void scanForNestedRef(Scope sc)
74 { 74 {
75 e1.scanForNestedRef(sc); 75 e1.scanForNestedRef(sc);
76 } 76 }
77 77
78 Expression interpretCommon(InterState istate, Expression *(*fp)(Type* a0, Expression* a1)) 78 Expression interpretCommon(InterState istate, Expression *(*fp)(Type* a0, Expression* a1))
79 { 79 {
80 assert(false); 80 assert(false);
81 } 81 }
82 82
83 bool canThrow() 83 override bool canThrow()
84 { 84 {
85 return e1.canThrow(); 85 return e1.canThrow();
86 } 86 }
87 87
88 int inlineCost(InlineCostState* ics) 88 override int inlineCost(InlineCostState* ics)
89 { 89 {
90 return 1 + e1.inlineCost(ics); 90 return 1 + e1.inlineCost(ics);
91 } 91 }
92 92
93 Expression doInline(InlineDoState ids) 93 override Expression doInline(InlineDoState ids)
94 { 94 {
95 UnaExp ue = cast(UnaExp)copy(); 95 UnaExp ue = cast(UnaExp)copy();
96 96
97 ue.e1 = e1.doInline(ids); 97 ue.e1 = e1.doInline(ids);
98 return ue; 98 return ue;
99 } 99 }
100 100
101 Expression inlineScan(InlineScanState* iss) 101 override Expression inlineScan(InlineScanState* iss)
102 { 102 {
103 e1 = e1.inlineScan(iss); 103 e1 = e1.inlineScan(iss);
104 return this; 104 return this;
105 } 105 }
106 106