Skip to content

Commit

Permalink
Alias via getAtomic instead
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed May 15, 2024
1 parent c8fe75b commit 869bea4
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions source/numem/mem/ptr.d
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public:
}

// Allows accessing members of the unique_ptr
alias _iGetValue this;
alias getAtomic this;

private:
refcountmg_t!(T)* rc;
Expand All @@ -129,12 +129,6 @@ private:
rc.strongRefs = 1;
rc.weakRefs = 0;
}

pragma(inline, true)
@property
VT _iGetValue() {
return getAtomic();
}

public:

Expand Down Expand Up @@ -297,7 +291,7 @@ public:
}

// Allows accessing members of the unique_ptr
alias _iGetValue this;
alias getAtomic this;

private:
refcountmg_t!(T)* rc;
Expand All @@ -315,12 +309,6 @@ private:
this.rc = other.rc;
this.rc.addRef!false;
}

pragma(inline, true)
@property
T _iGetValue() {
return getAtomic();
}

public:

Expand Down Expand Up @@ -476,7 +464,7 @@ public:
}

// Allows accessing members of the unique_ptr
alias _iGetValue this;
alias getAtomic this;

private:
refcountmg_t!(T)* rc;
Expand All @@ -486,12 +474,6 @@ private:
this.rc = rc;
this.rc.addRef!true;
}

pragma(inline, true)
@property
VT _iGetValue() {
return getAtomic();
}

public:

Expand Down

0 comments on commit 869bea4

Please sign in to comment.