weimingtom / angel-engine

Automatically exported from code.google.com/p/angel-engine
0 stars 0 forks source link

Actor::GetClassName lacking const #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
virtual const String GetClassName() { return "Actor"; }

should be

virtual const String GetClassName() const { return "Actor"; }

all descendants of Actor have this correct, causing a mismatch.

Original issue reported on code.google.com by LoveOver...@gmail.com on 27 Sep 2013 at 9:34

GoogleCodeExporter commented 8 years ago
On second analysis, some parts of the hierarchy follow one convention, and 
others follow another.

Particle, HUD, and FullScreen follow Actor in making it non-const, where as 
Physics and Grid both use const.

Either convention is fine, with my recommendation being all const, but they all 
have to do the same thing as their base class or clang and gcc don't like it.

Original comment by LoveOver...@gmail.com on 27 Sep 2013 at 9:57

GoogleCodeExporter commented 8 years ago
Fixed in repo. 

Original comment by lieseg...@gmail.com on 28 Sep 2013 at 5:15

GoogleCodeExporter commented 8 years ago

Original comment by lieseg...@gmail.com on 28 Sep 2013 at 5:15