Browse Source

Prevented changes in the casing of functions bearing the same name as their name-space.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/658/head
Dimitar Dobrev 9 years ago
parent
commit
8d2c5f49b5
  1. 1
      src/Generator/Passes/RenamePass.cs
  2. 4
      tests/CSharp/CSharp.cpp
  3. 1
      tests/CSharp/CSharp.h

1
src/Generator/Passes/RenamePass.cs

@ -120,6 +120,7 @@ namespace CppSharp.Passes
var function = decl as Function; var function = decl as Function;
if (function != null && function.SynthKind != FunctionSynthKind.AdjustedMethod) if (function != null && function.SynthKind != FunctionSynthKind.AdjustedMethod)
{ {
declarations.Add(function.Namespace);
// account for overloads // account for overloads
declarations.AddRange(GetFunctionsWithTheSameParams(function)); declarations.AddRange(GetFunctionsWithTheSameParams(function));
} }

4
tests/CSharp/CSharp.cpp

@ -41,6 +41,10 @@ void Foo::setNoParams()
{ {
} }
void Foo::foo(int i)
{
}
const int Foo::rename; const int Foo::rename;
int Foo::makeFunctionCall() int Foo::makeFunctionCall()

1
tests/CSharp/CSharp.h

@ -16,6 +16,7 @@ public:
int (STDCALL *attributedFunctionPtr)(); int (STDCALL *attributedFunctionPtr)();
bool isNoParams(); bool isNoParams();
void setNoParams(); void setNoParams();
void foo(int i);
static const int rename = 5; static const int rename = 5;
static int makeFunctionCall(); static int makeFunctionCall();

Loading…
Cancel
Save