@ -26,12 +26,18 @@ namespace CppSharp.Passes
if ( @class = = null )
if ( @class = = null )
return false ;
return false ;
// TODO: If the translation units of the declarations are different,
// and we apply the pass, we might need additional includes in the
// generated translation unit of the class.
if ( @class . TranslationUnit ! = function . TranslationUnit )
return false ;
// Clean up the name of the function now that it will be a static method.
// Clean up the name of the function now that it will be a static method.
var name = function . Name . Substring ( @class . Name . Length ) ;
var name = function . Name . Substring ( @class . Name . Length ) ;
function . ExplicityIgnored = true ;
function . ExplicityIgnored = true ;
// Create a new fake method so it acts as a static method.
// Create a new fake method so it acts as a static method.
var method = new Method ( )
var method = new Method
{
{
Namespace = @class ,
Namespace = @class ,
OriginalNamespace = function . Namespace ,
OriginalNamespace = function . Namespace ,