comparison dmd/StaticAssert.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 69494b249ace
children e28b18c23469
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
24 this.loc = loc; 24 this.loc = loc;
25 this.exp = exp; 25 this.exp = exp;
26 this.msg = msg; 26 this.msg = msg;
27 } 27 }
28 28
29 Dsymbol syntaxCopy(Dsymbol s) 29 override Dsymbol syntaxCopy(Dsymbol s)
30 { 30 {
31 StaticAssert sa; 31 StaticAssert sa;
32 32
33 assert(!s); 33 assert(!s);
34 sa = new StaticAssert(loc, exp.syntaxCopy(), msg ? msg.syntaxCopy() : null); 34 sa = new StaticAssert(loc, exp.syntaxCopy(), msg ? msg.syntaxCopy() : null);
35 return sa; 35 return sa;
36 } 36 }
37 37
38 bool addMember(Scope sc, ScopeDsymbol sd, bool memnum) 38 override bool addMember(Scope sc, ScopeDsymbol sd, bool memnum)
39 { 39 {
40 return false; // we didn't add anything 40 return false; // we didn't add anything
41 } 41 }
42 42
43 void semantic(Scope sc) 43 override void semantic(Scope sc)
44 { 44 {
45 } 45 }
46 46
47 void semantic2(Scope sc) 47 override void semantic2(Scope sc)
48 { 48 {
49 Expression e; 49 Expression e;
50 50
51 //printf("StaticAssert::semantic2() %s\n", toChars()); 51 //printf("StaticAssert::semantic2() %s\n", toChars());
52 e = exp.semantic(sc); 52 e = exp.semantic(sc);
78 { 78 {
79 error("(%s) is not evaluatable at compile time", exp.toChars()); 79 error("(%s) is not evaluatable at compile time", exp.toChars());
80 } 80 }
81 } 81 }
82 82
83 void inlineScan() 83 override void inlineScan()
84 { 84 {
85 } 85 }
86 86
87 bool oneMember(Dsymbol* ps) 87 override bool oneMember(Dsymbol* ps)
88 { 88 {
89 //printf("StaticAssert.oneMember())\n"); 89 //printf("StaticAssert.oneMember())\n");
90 *ps = null; 90 *ps = null;
91 return true; 91 return true;
92 } 92 }
93 93
94 void toObjFile(int multiobj) 94 override void toObjFile(int multiobj)
95 { 95 {
96 } 96 }
97 97
98 string kind() 98 override string kind()
99 { 99 {
100 return "static assert"; 100 return "static assert";
101 } 101 }
102 102
103 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 103 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
104 { 104 {
105 buf.writestring(kind()); 105 buf.writestring(kind());
106 buf.writeByte('('); 106 buf.writeByte('(');
107 exp.toCBuffer(buf, hgs); 107 exp.toCBuffer(buf, hgs);
108 if (msg) 108 if (msg)