Re: [GD-General] C++ analyzers?
Brought to you by:
vexxed72
From: Mickael P. <mpo...@ed...> - 2002-07-19 11:45:47
|
> > We have tools to automatically generate code and do all other kinds of > > fluff crap, but if you actually want something that can go through and > > rename all instances of "m_foo" for all instances of class "CBar", it > > doesn't seem possible. > > Well, the compiler can sure help: > > 1. rename "m_foo" to "m_foobar" in the header > > 2. compile > > 3. visit each compile error and fix by hand (or with an editor macro > if it's a big job) > > I've found that manual brute force takes much longer in theory than in > practice. Once I had to rename a 3D vector class from "vector" to > "vec3" throughout a working game; I was dreading it, but it took all > of about 30 minutes. That's by far the worst case I've ever > encountered. Sure it would be nice if it took 10 seconds, but it's > not something most people have to do every week. Work only on a clean project. At hope, I decided to modernize the 6502 cross assembler I was using, a nice small tool visibly developped on a long time period, with a mix of old C parameter definition, new style parameters, all globals and locals were in lowercase without any syntactic convention, half comments in german, half in english, and most of variables were one or two letter long. So I tried what you said, and renamed a local called "s" in the main loop of the parser, and rebuilded.... ZERO error :))) The reason ? In the code "s" was also a global variable in one of the modules... Never underevaluate the code ! Mickael Pointier |