C/C++ canonicaliser?
- by A T
Are there any C/C++ automated canonicallisers? - Something like astyle but which makes your code more concise, rather than formats it?
For example, to go from:
float foo() {
float a;
float b;
a = 9455.34;
b = 3543.8;
return a*b;
}
int main(void) {
float b;
b = foo();
return 0;
}
To:
float foo(); // Automated prototype creation
int main(void) {
float b = foo();
return 0;
}
float foo() {
return 9455.34*3543.8;
}
(this is my coding style FYI: to reduce the lines-of-code without sacrificing readability)