vim-protodef icon indicating copy to clipboard operation
vim-protodef copied to clipboard

protodef should not look at names of parameters when making stubs

Open metellius opened this issue 13 years ago • 1 comments

If I have test.h

class Test
 {
     void aa(int c);
 };

and test.cpp

#include "test.h"

void Test::aa(int b)
{
}

void Test::aa(int)
{
}

protodef would then generate yet another aa method even though two of them already exist. What is needed for having protodef only look at the signatures of the function and ignore the parameter names? If you gave me some pointers in where to start, I could even try to take on this task myself, because it is the only thing keeping me from using protodef at work (right now it's generating way too many functions that already exist, and I won't do an enormous commit in our project just for having protodef work)

metellius avatar Jul 23 '12 19:07 metellius

Off the top of my head, this would be in the perl script. I'm currently sunning myself in northern ontario, and I'm not gonna go through the source code from here :). I can take a look at it next week, though.

One thing I wouldn't want to see go away is the generation of code without the names. My convention for well over a decade now is to have identical representations in both files. ------Original Message------ From: metellius To: Derek Wyatt (home) Subject: [vim-protodef] protodef should not look at names of parameters when making stubs (#5) Sent: 23 Jul 2012 3:32 PM

If I have test.h

class Test
 {
     void aa(int c);
 };

and test.cpp

#include "test.h"

void Test::aa(int b)
{
}

void Test::aa(int)
{
}

protodef would then generate yet another aa method even though two of them already exist. What is needed for having protodef only look at the signatures of the function and ignore the parameter names? If you gave me some pointers in where to start, I could even try to take on this task myself, because it is the only thing keeping me from using protodef at work (right now it's generating way too many functions that already exist, and I won't do an enormous commit in our project just for having protodef work)


Reply to this email directly or view it on GitHub: https://github.com/derekwyatt/vim-protodef/issues/5

Sent from my BlackBerry

derekwyatt avatar Jul 23 '12 19:07 derekwyatt