Skip to content

Commit

Permalink
Remove const ref from Loc parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel committed Feb 10, 2025
1 parent 5170f3f commit 3447809
Show file tree
Hide file tree
Showing 75 changed files with 923 additions and 923 deletions.
4 changes: 2 additions & 2 deletions compiler/src/dmd/aggregate.d
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
bool disableNew; /// disallow allocations using `new`
Sizeok sizeok = Sizeok.none; /// set when structsize contains valid data

final extern (D) this(const ref Loc loc, Identifier id)
final extern (D) this(Loc loc, Identifier id)
{
super(loc, id);
visibility = Visibility(Visibility.Kind.public_);
Expand Down Expand Up @@ -189,7 +189,7 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol

abstract void finalizeSize();

override final uinteger_t size(const ref Loc loc)
override final uinteger_t size(Loc loc)
{
//printf("+AggregateDeclaration::size() %s, scope = %p, sizeok = %d\n", toChars(), _scope, sizeok);
bool ok = determineSize(this, loc);
Expand Down
8 changes: 4 additions & 4 deletions compiler/src/dmd/aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace dmd
{
FuncDeclaration *search_toString(StructDeclaration *sd);
void semanticTypeInfoMembers(StructDeclaration *sd);
bool fill(StructDeclaration* sd, const Loc &loc, Expressions &elements, bool ctorinit);
bool fill(StructDeclaration* sd, Loc loc, Expressions &elements, bool ctorinit);
}

enum class ClassKind : uint8_t
Expand Down Expand Up @@ -119,7 +119,7 @@ class AggregateDeclaration : public ScopeDsymbol

virtual Scope *newScope(Scope *sc);
virtual void finalizeSize() = 0;
uinteger_t size(const Loc &loc) override final;
uinteger_t size(Loc loc) override final;
Type *getType() override final;
bool isDeprecated() const override final; // is aggregate deprecated?
bool isNested() const;
Expand Down Expand Up @@ -168,7 +168,7 @@ class StructDeclaration : public AggregateDeclaration
private:
uint16_t bitFields;
public:
static StructDeclaration *create(const Loc &loc, Identifier *id, bool inObject);
static StructDeclaration *create(Loc loc, Identifier *id, bool inObject);
StructDeclaration *syntaxCopy(Dsymbol *s) override;
const char *kind() const override;
void finalizeSize() override final;
Expand Down Expand Up @@ -278,7 +278,7 @@ class ClassDeclaration : public AggregateDeclaration
ObjcClassDeclaration objc; // Data for a class declaration that is needed for the Objective-C integration
Symbol *cpp_type_info_ptr_sym; // cached instance of class Id.cpp_type_info_ptr

static ClassDeclaration *create(const Loc &loc, Identifier *id, BaseClasses *baseclasses, Dsymbols *members, bool inObject);
static ClassDeclaration *create(Loc loc, Identifier *id, BaseClasses *baseclasses, Dsymbols *members, bool inObject);
const char *toPrettyChars(bool QualifyTypes = false) override;
ClassDeclaration *syntaxCopy(Dsymbol *s) override;
Scope *newScope(Scope *sc) override;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/aliasthis.d
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern (C++) final class AliasThis : Dsymbol
/// Whether this `alias this` is deprecated or not
bool isDeprecated_;

extern (D) this(const ref Loc loc, Identifier ident) @safe
extern (D) this(Loc loc, Identifier ident) @safe
{
super(loc, null); // it's anonymous (no identifier)
this.ident = ident;
Expand Down
Loading

0 comments on commit 3447809

Please sign in to comment.