Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dmd/astbase.d
Original file line number Diff line number Diff line change
Expand Up @@ -3438,7 +3438,7 @@ struct ASTBase
}

// TypeBasic, TypeVector, TypePointer, TypeEnum override this method
bool isscalar()
bool isscalar() const
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ extern (C++) abstract class AttribDeclaration : Dsymbol
include(null).foreachDsymbol( s => s.setFieldOffset(ad, poffset, isunion) );
}

override final bool hasPointers()
override final bool hasPointers() const
{
return include(null).foreachDsymbol( (s) { return s.hasPointers(); } ) != 0;
return (cast() this).include(null).foreachDsymbol( (s) { return s.hasPointers(); } ) != 0;
}

override final bool hasStaticCtorOrDtor()
Expand Down
2 changes: 1 addition & 1 deletion src/dmd/attrib.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AttribDeclaration : public Dsymbol
const char *kind() const;
bool oneMember(Dsymbol **ps, Identifier *ident);
void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);
bool hasPointers();
bool hasPointers() const;
bool hasStaticCtorOrDtor();
void checkCtorConstInit();
void addLocalClass(ClassDeclarations *);
Expand Down
4 changes: 2 additions & 2 deletions src/dmd/declaration.d
Original file line number Diff line number Diff line change
Expand Up @@ -1348,10 +1348,10 @@ extern (C++) class VarDeclaration : Declaration
v.offset < offset + tsz;
}

override final bool hasPointers()
override final bool hasPointers() const
{
//printf("VarDeclaration::hasPointers() %s, ty = %d\n", toChars(), type.ty);
return (!isDataseg() && type.hasPointers());
return (!(cast() this).isDataseg() && type.hasPointers());
}

/*************************************
Expand Down
2 changes: 1 addition & 1 deletion src/dmd/declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class VarDeclaration : public Declaration
bool isThreadlocal();
bool isCTFE();
bool isOverlappedWith(VarDeclaration *v);
bool hasPointers();
bool hasPointers() const;
bool canTakeAddressOf();
bool needsScopeDtor();
bool enclosesLifetimeOf(VarDeclaration *v) const;
Expand Down
2 changes: 1 addition & 1 deletion src/dmd/dsymbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ extern (C++) class Dsymbol : ASTNode
/*****************************************
* Is Dsymbol a variable that contains pointers?
*/
bool hasPointers()
bool hasPointers() const
{
//printf("Dsymbol::hasPointers() %s\n", toChars());
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/dmd/dsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class Dsymbol : public ASTNode
virtual Dsymbol *syntaxCopy(Dsymbol *s); // copy only syntax trees
virtual bool oneMember(Dsymbol **ps, Identifier *ident);
virtual void setFieldOffset(AggregateDeclaration *ad, unsigned *poffset, bool isunion);
virtual bool hasPointers();
virtual bool hasPointers() const;
virtual bool hasStaticCtorOrDtor();
virtual void addLocalClass(ClassDeclarations *) { }
virtual void addObjcSymbols(ClassDeclarations *, ClassDeclarations *) { }
Expand Down
4 changes: 2 additions & 2 deletions src/dmd/dtemplate.d
Original file line number Diff line number Diff line change
Expand Up @@ -7440,10 +7440,10 @@ extern (C++) final class TemplateMixin : TemplateInstance
return members.foreachDsymbol( (s) { return s && s.apply(fp, param); } );
}

override bool hasPointers()
override bool hasPointers() const
{
//printf("TemplateMixin.hasPointers() %s\n", toChars());
return members.foreachDsymbol( (s) { return s.hasPointers(); } ) != 0;
return (cast(Dsymbols*) members).foreachDsymbol( (s) { return s.hasPointers(); } ) != 0;
}

override void setFieldOffset(AggregateDeclaration ad, uint* poffset, bool isunion)
Expand Down
Loading