comparison dmd/InvariantDeclaration.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 10317f0c89a5
children 43073c7c7769
comparison
equal deleted inserted replaced
71:8e24ef1dd139 72:2e2a5c3f943a
18 this(Loc loc, Loc endloc) 18 this(Loc loc, Loc endloc)
19 { 19 {
20 super(loc, endloc, Id.classInvariant, STCundefined, null); 20 super(loc, endloc, Id.classInvariant, STCundefined, null);
21 } 21 }
22 22
23 Dsymbol syntaxCopy(Dsymbol s) 23 override Dsymbol syntaxCopy(Dsymbol s)
24 { 24 {
25 assert(!s); 25 assert(!s);
26 InvariantDeclaration id = new InvariantDeclaration(loc, endloc); 26 InvariantDeclaration id = new InvariantDeclaration(loc, endloc);
27 FuncDeclaration.syntaxCopy(id); 27 FuncDeclaration.syntaxCopy(id);
28 return id; 28 return id;
29 } 29 }
30 30
31 void semantic(Scope sc) 31 override void semantic(Scope sc)
32 { 32 {
33 AggregateDeclaration ad; 33 AggregateDeclaration ad;
34 Type tret; 34 Type tret;
35 35
36 parent = sc.parent; 36 parent = sc.parent;
56 FuncDeclaration.semantic(sc); 56 FuncDeclaration.semantic(sc);
57 57
58 sc.pop(); 58 sc.pop();
59 } 59 }
60 60
61 bool isVirtual() 61 override bool isVirtual()
62 { 62 {
63 return false; 63 return false;
64 } 64 }
65 65
66 bool addPreInvariant() 66 override bool addPreInvariant()
67 { 67 {
68 return false; 68 return false;
69 } 69 }
70 70
71 bool addPostInvariant() 71 override bool addPostInvariant()
72 { 72 {
73 return false; 73 return false;
74 } 74 }
75 75
76 void emitComment(Scope sc) 76 override void emitComment(Scope sc)
77 { 77 {
78 assert(false); 78 assert(false);
79 } 79 }
80 80
81 void toCBuffer(OutBuffer buf, HdrGenState* hgs) 81 override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
82 { 82 {
83 if (hgs.hdrgen) 83 if (hgs.hdrgen)
84 return; 84 return;
85 buf.writestring("invariant"); 85 buf.writestring("invariant");
86 bodyToCBuffer(buf, hgs); 86 bodyToCBuffer(buf, hgs);
87 } 87 }
88 88
89 InvariantDeclaration isInvariantDeclaration() { return this; } 89 override InvariantDeclaration isInvariantDeclaration() { return this; }
90 } 90 }